PDA

View Full Version : File Extensions



Pathos
04-18-2003, 10:39 AM
Hola kids,

Every week at work i need to rename 14 files. It's the same files week in and week out, and i need to rename each and every one to give it a ".mrg" extension (which i later use in an overly elaborate macro in excel). Thus my question is: is there a way to change the extensions on a bunch of files at once regardless of the file name (they are 14 DIFFERENT file names - and must remain so; they need only share the same said extensions)? Did that make sense? [scratches head]

While i'm here, does anyone have any idea if it's possible to rename a file through a macro (ie, Visual Basic) in Excel?

It's all really no biggie, but if i could save myself some teeth grinding tedium it would be just peachy.

Cheers regardless

chaotic42
04-18-2003, 11:18 AM
Would:

move *.??? *.mrg

work? Sorry, I'm rusty with DOS.

Wait, sorry. They are always the same files? Then write a batch file.

---

@echo off
move file1.abc file1.mrg
move file2.adc file2.mrg
move file3.aec file3.mrg
move file4.abg file4.mrg
move file5.bbc file5.mrg
move file6.qwc file6.mrg
.
.
.
---

FUS1ON
04-18-2003, 12:33 PM
Pathos this sounds like it will work and it's free. LINK (http://www.1-4a.com/rename/rename-examples.htm)

OUTLAWS DirtGod
04-18-2003, 05:29 PM
Thats a slick little program.... :thumbs:

OUTLAWS Behind You?
04-18-2003, 08:53 PM
How about rename:

rename *.* *.mrg

Could be put into a batch file....

Pathos
04-20-2003, 08:30 AM
That's just what i needed. Thanks a lot, guys - much appreciated! I'll have a few more hairs come the conclusion of next monday. [thumbs up]

Mitchyl
04-21-2003, 04:18 AM
As far as a batch script would go

@echo off
rename <filename1>.ext1 <filename1>.ext2
rename <filename2>.ext1 <filename2>.ext2
...

Fairly simple script if the file names are always the same.

Mitchyl / DE