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

  Turtlesrun1 15:42 02 Apr 15
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 15

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.

LG G6 review: Hands-on with LG’s bold, big-screen shot at perfection

1995-2015: How technology has changed the world in 20 years

How the 2017 Oscar-winning VFX of The Jungle Book were created

The 22 best Safari extensions | Best Safari plugins: Improve Apple's Safari web browser with these…