PPRuNe Forums - View Single Post - a fast way to replace 1000+ files?
View Single Post
Old 23rd January 2009 | 23:53
  #3 (permalink)  
DUS SLF
 
Joined: Mar 2008
Posts: 9
Likes: 0
From: Germany
2nd attempt, 1st one crashed the thread and got deleted.

Assuming you are using Windows and have Excel or the OO counterpart, there is a away using DOS commands.

It's a bit annoying but there's nothing else I could think of except googling for a tool that does the same with less legwork.

1) Create a .txt file in your target folder (the one with the 1000+ files) and rename it to something like step1.bat. Windows will warn you about the extension, but it's okay.
2) Right-click on the text file and edit it to contain this command: dir /B >filelist.txt
3) Save the file and close it.
4) Double-click step1.bat to run it. You'll have a file list called filelist.txt in no time.
5) Open filelist.txt in Excel. Excel will ask a couple of questions but the answers should be obvious. You now have the list of target names on column A
6) Move the target names to column C, fill column A with xcopy and column B with the name of your source file, including extension. Fill column D with /Y unless you want to confirm each overwrite. Each line in your Excel file should look something like this: Xcopy sourcename.bmp targetname.bmp /Y
7) Save this as step2.txt in your target folder (make sure file format is still .txt and not XLS) and then rename to step2.bat using the Explorer or something like that
8) Copy the source file to the target folder
9) Read this warning: if all was done right and all goes according to plan running step2.bat will overwrite your original bmps. There is no way to recover them once the batch file was run. Better create a backup first.
10) Run step2.bat, check all was copied ok and clean away the temporary files

That's it, sounds more complicated than it is, really. Feel free to PM me for clarification.

However, if someone knows a better way, I am eager to hear it as I use the above process a lot.
DUS SLF is offline  
Reply