I need to change .JPG to .jpg in a particular folder. Needs to do subfolders too. Thanks.
Command to rename file extensions on a server?
Collapse
X
-
-
mv in nix, ren in win
Multihomed quality BW for less
ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.comComment
-
execute:
cd /path/to/folder; ls -al | grep JPG | awk '{print $9, $9}' >shit && vi shit
in vi hit escape, delete the top two lines (should be "." and "..", these can be deleted by hitting "d" twice, followed by shift-colon, at the colon prompt enter this sequence:
%s/^/mv /g
enter after that, simply change the second colum to have lower case jpg at the end. escape back to shell and save by hitting escape shift-colon and at the prompt enter:
wq!
at the prompt execute:
sh shit
I would explain how to do it for all files etc... but that's getting a bit tricky and wouldnt want to do so without seeing the file structure myself. be careful!
Real. Professional. Hosting.
.:Expect Nothing Less:.
320-078-843 :: www.realprohosting.com :: [email protected]Comment
-
Why dont you just delete the files you uploaded. Then, on your pc, do a batch rename of the extension with Namewiz or any other renaming proggie. Then re-upload the shit.
Much safer than going in " shell" by telnet....
Or if not too many, use an FTP like shell manager:
F-Securee SSH file transfer. If interested, could post the link...I know that Asspimple is stoopid ... As he says, it is a FACT !
But I can't figure out how he can breathe or type , at the same time ....Comment
-
regular expressions own!
I've always wished that this was syntactically correct:
# mv *.WHATEVER *.whatever
hehe
Real. Professional. Hosting.
.:Expect Nothing Less:.
320-078-843 :: www.realprohosting.com :: [email protected]Comment
-
Nice sledgehammer for a little nutOriginally posted by com
execute:
cd /path/to/folder; ls -al | grep JPG | awk '{print $9, $9}' >shit && vi shit
in vi hit escape, delete the top two lines (should be "." and "..", these can be deleted by hitting "d" twice, followed by shift-colon, at the colon prompt enter this sequence:
%s/^/mv /g
enter after that, simply change the second colum to have lower case jpg at the end. escape back to shell and save by hitting escape shift-colon and at the prompt enter:
wq!
at the prompt execute:
sh shit
I would explain how to do it for all files etc... but that's getting a bit tricky and wouldnt want to do so without seeing the file structure myself. be careful!I don't endorse a god damn thing......
Comment
-
Just didn't want to have to re-upload everrrrrrrrrything. But i just realised my FTP program has a setting that will only upload the new files. ooh. Thanks for the help anyways.Originally posted by directfiesta
Why dont you just delete the files you uploaded. Then, on your pc, do a batch rename of the extension with Namewiz or any other renaming proggie. Then re-upload the shit.
Much safer than going in " shell" by telnet....
Or if not too many, use an FTP like shell manager:
F-Securee SSH file transfer. If interested, could post the link...26 + 6 = 1Comment
-
depends on how you look at it... for me unix power tools are second nature... takes me less then a minute to accomplish what I need. How would you go about itOriginally posted by blazin
Nice sledgehammer for a little nut
Real. Professional. Hosting.
.:Expect Nothing Less:.
320-078-843 :: www.realprohosting.com :: [email protected]Comment

Comment