Click to See Complete Forum and Search --> : File Extension in VBScript


JediKnight
July 1st, 2007, 09:47 AM
Hello,

Can anyone help me out please.

I have copied 300 files from an IBM mainframe to my PC using FTP and I now have all the files in a folder on my PC. However, none of the files has an extension. Example, the first file in my folder is called PROD.TEST.MVS(AAAAA), the second is called PROD.TEST.MVS(BBBBB) and so on....

I want some VBScript to loop through and add .TXT onto each file.

Can it be done ?

PeejAvery
July 1st, 2007, 10:05 AM
If you use VBScript, you would have to do a directory listing to an array and then read through that array renaming each file individually. Why not just do a DOS prompt?
rename *.* *.txt