CMD - Batch file to Rename files - % in file name causing issue.

  Turtlesrun1 15:42 02 Apr 2015
Locked

hi all,

i have created a batch file that will run 171234 lines of code to rename 171234 files.

...............................................................

chcp 1252 Ren "75%.pdf" "146574 - Puttsawamy N - acceptance terms received - 75 loading - 29.09.09.pdf" timeout 100

Ren "£100.pdf" "14234224234246574 - Puttsawamy N - acceptance terms received - 75 loading - 29.09.09.pdf" timeout 100

..................................................................

this batch file worked on the majority of files but those with "£" characters and "%" did not due to the fact that on the output screen the characters are either not displayed or are different on the screen.

the file names containing a "£" were eventually fixed by changing chcp from default to 1252 but i cant resolve the "%" files.

(if they are input manually the problem is solved but they do not work in the batch file)

any help with this would be greatly appreciated.

  robin_x 20:05 02 Apr 2015

I expect it's simple if you know your way around Code Pages and Character Sets

Have you looked at 3rd Party utilities?

I'm afraid I can't recommend a particular one

click here

click here

click here

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone