PPRuNe Forums - View Single Post - Running a batch file under XP
View Single Post
Old 15th October 2005 | 12:18
  #1 (permalink)  
Lurk R
 
Joined: Oct 1999
Posts: 356
Likes: 0
From: Melbourne - Australia
Running a batch file under XP

Background:

I have about 20 folders - each has about 30 files that I need to change the file type fairly regularly. Rather than do it via Windows Explorer, I just open a DOS command window and type:

rename c: \folder1\*.xls *.csv

It changes all the Excel files into .csv files but keeps the same file name. I then re-type the command for the other 19 folders and the job is done.

It occurred to me the other day that writing and running a batch file would be a lot faster. So I wrote the following:

rename c: \folder1\*.xls *.csv
rename c: \folder2\*.xls *.csv
rename c: \folder3\*.xls *.csv

etc.

rename c: \folder20\*.xls *.csv
exit



But when I doubleclick the batch file, a DOS window pops up, text scrolls at a zillion miles per hour and the window closes. When I check the folders, none of the files have changed name.


Does anyone have any clues what I might be doing wrong? Or if there is a better way of achieving the same thing? And no - buying a Mac is not an option!!!

Thanks in advance...
Lurk R is offline