Hi all. Im looking for the correct .bat code to rename a lot of one file to another. What i used was as follows
ren *.gif *.zip
can someone please tell me the correct code for such an operation?
thanks in advance
Hi all. Im looking for the correct .bat code to rename a lot of one file to another. What i used was as follows
ren *.gif *.zip
can someone please tell me the correct code for such an operation?
thanks in advance
can someone please tell me the correct code for such an operation?
Did it not work? It looks correct.
well i saved it as a .bat and put it into the directory that i wanted! are there rules/restrictions on the directory?
sorry, i rtied again and it works!
Congratulations. It's good to hear your program works. (By definition, a batch file is a program.)
are there rules/restrictions on the directory?
The only rules/restrictions that apply are attributes and path rules. I'm sure you have some idea of what they are... (I don't really want to try to write it all out.)
Keep in mind that simply renaming a file is not going to make it a .ZIP file. If you try to open that file in Winzip, it's not going to work.
You might want to look into some way to use PKZIP or some other DOS utility to actually zip the files.
i know that, but the files were meant to be renamed, thx neway alc
i know that, but the files were meant to be renamed, thx neway alc
Cool. The only reason I pointed it out is that I ran into a guy who actually thought you made zip files that way! :p
hahaha :P :P
This is years old thread, but just wanted to add that we can also change file extensions for the files in subfolders. the batch script can be downloaded from here:
http://www.windows-commandline.com/2012/07/change-file-extensions.html
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.