xbox360dp
asked on
Removing file extension within a file.
Gurus,
I need a script that will search through file and remove the any ".tmp" extension it finds.
Before Example:
xxx.log
Transfer file: csm_itemmaster_20150811115 313.csv.tm p*****
After Example:
xxx.log
Transfer file: csm_itemmaster_20150811115 313.csv*** **
Any help would be appreciated :)
I need a script that will search through file and remove the any ".tmp" extension it finds.
Before Example:
xxx.log
Transfer file: csm_itemmaster_20150811115
After Example:
xxx.log
Transfer file: csm_itemmaster_20150811115
Any help would be appreciated :)
Do you want to change the name of the file, or a file name that is in the contents of a file?
~bp
~bp
ASKER
I want to change the file name in the contents of the file not the file name itself.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Echo off
Rem change information in quotes and remove "
Rem (point to the drive you want)
cd "c":
Rem (point to the directory you want)
cd "filesfolder"
Rem This will search an entire folder and rename those that match
ren *."tmp" *."cmd"
exit