Remove BOM from XML files for the subdirs using dos2unix in Windows

663 views Asked by At

I have some problems with BOM symbols in a large amount of XML files nested in the subdirectories. Some of them have the BOM and I need to remove it. I can do it for the exact directory like this:

dos2unix.exe -r d:\path\to\directory

But I need something like a BAT file to remove BOM for the files in the subdirectories to save the time. How can I do this?

1

There are 1 answers

4
MSalters On BEST ANSWER

Sounds like you don't need a batch file, but just for /R %X in (*.xml) do dos2unix -r %X