Link to home
Start Free TrialLog in
Avatar of Fraser_Admin
Fraser_AdminFlag for Canada

asked on

How to Rename a filename in a batch file

I have a batch file running every minute that copies "pdf" files from one server to another. Unfortunately I have users that manually scan the slips and during the naming of the file for some reason some time a file is named "filename.pdf.pdf" This makes the final process of no affect. What line can I add to the batch file that says if *.pdf.pdf exists rename to *.pdf?
Avatar of rsivanandan
rsivanandan
Flag of India image

ren *.pdf.pdf *.pdf

Cheers,
Rajesh
ASKER CERTIFIED SOLUTION
Avatar of SteveGTR
SteveGTR
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fraser_Admin

ASKER

You the man!!

Thanks!