1.

Solve : Batch files and characters not recognised by DOS?

Answer»

Hi All
I've been doing this for years now but have received a PC with loads of file names with spaces and "&" CHARACTERS in the folder and file names. Have WRITTEN a batch file to delete the duplicate file names but the DOS command won't execute line commands such as

"del C:\Data_emails_copy_071107\10_S&S_Oct_JN_06.dbx" .. because of the "SPACE" and "&" in the command line.

Tried %20 but it also bombed.

Is their a substitute character for the batch file syntax to make it execute the line. There are 1000's of files and folders with these characters so RENAMING manually is not an option.

Thx

Kens
try to escape them, the & symbol is FORCING it to read it like..

"del C:\data_emails_copy_071107\10_S
& S_Oct_jn_06.dbx"


so try "del C:\Data_emails_copy_071107\10_S^^&S_Oct_JN_06.dbx"

del,C:\Data_emails_copy_071107\10_S&S_Oct_JN_06.dbx"

might also work



Discussion

No Comment Found