Need assistance making a batch file for renaming files in separate folders
Posted
by
Carnaxus
on Super User
See other posts from Super User
or by Carnaxus
Published on 2011-11-17T07:03:25Z
Indexed on
2011/11/17
9:57 UTC
Read the original article
Hit count: 431
Ok, here's one for you. I'm trying to use a batch file to rename a bunch of files, but none of them are in the same folder as the batch file itself. The command prompt keeps telling me that the directory can't be found. I suppose I could just rename all the files in all the folders that match the filename, but I don't want to do that either; I only want to change certain ones.
My batch file as it stands is:
@echo off
ren "engine/info.txt" "disabled.txt"
ren "gravplating/info.txt" "disabled.txt"
ren "HAWX content/info.txt" "disabled.txt"
ren "laserz/info.txt" "disabled.txt"
ren "NeuroNaval/info.txt" "disabled.txt"
ren "NeuroPlanes/info.txt" "disabled.txt"
ren "NeuroTanks/info.txt" "disabled.txt"
ren "NeuroWeapons/info.txt" "disabled.txt"
ren "WAC Base/info.txt" "disabled.txt"
ren "WAC DamageSystem/info.txt" "disabled.txt"
ren "WAC GravityController/info.txt" "disabled.txt"
ren "WAC Helicopters/info.txt" "disabled.txt"
ren "WAC Sweps/info.txt" "disabled.txt"
ren "weapons/info.txt" "disabled.txt"
ren "AFF_ships/info.txt" "disabled.txt"
ren "AntiTakeRifle/info.txt" "disabled.txt"
ren "Catmull-Rom Cameras/info.txt" "disabled.txt"
ren "Displacer Cannon/info.txt" "disabled.txt"
ren "Drumdevil's Trains/info.txt" "disabled.txt"
ren "EVEOnline/info.txt" "disabled.txt"
ren "gm_botmap_v3/info.txt" "disabled.txt"
ren "gm_construct_flatgrass_v5-2/info.txt" "disabled.txt"
ren "gm_mobenix_v3_final/info.txt" "disabled.txt"
ren "gm_mobenix_v3_highquality_Water/info.txt" "disabled.txt"
ren "gm_snabbansairfield_b1/info.txt" "disabled.txt"
ren "gm_XhS_construct/info.txt" "disabled.txt"
ren "linedraw/info.txt" "disabled.txt"
ren "ModelManipulator/info.txt" "disabled.txt"
ren "NeuroCars/info.txt" "disabled.txt"
ren "Propeller Engine/info.txt" "disabled.txt"
ren "VanDookie and Predaaator's pack/info.txt" "disabled.txt"
ren "WAC ECM/info.txt" "disabled.txt"
ren "WAC Extra Helicopters/info.txt" "disabled.txt"
echo Done!
pause
© Super User or respective owner