PPRuNe Forums - View Single Post - Running a batch file under XP
View Single Post
Old 16th October 2005 | 19:38
  #13 (permalink)  
rotorcraig
 
Joined: Jul 2002
Posts: 537
Likes: 0
From: Northampton UK
cd c: \folder1 (space only for anti emoticon purposes)
ren *.xls *.csv
Take care - that only works if the default user directory is on drive c:

If the default user directory is d: \somewhere then cd c: \folder1 will tell the OS to change it's logical pointer on c: to \folder1 but your ren *.xls *.csv will try to take effect in d: \somewhere

So you would actually need to include

c:
cd \folder1
ren *.xls *.csv


But given that the original ren c: \folder1\*.xls *.csv was explicit it's better IMHO. With an explicit path in the command the default user directory is irrelevant.
rotorcraig is offline