Book now with code EOY2025
arwes wrote: » I've got an interesting predicament. The insurance software we use stores attachments in a directory structure like "..\Attachments\Images\2010\07\21". Well, come to find out, if the thing has a hiccup it stores the files in "..\Attachments\Other\2010\07\21" instead. When the person goes to pull the file up, it says it can't be located. I can manually move the file to the correct location and the user can then view the attachment with no problems. It's incredibly random. We just found out about this problem a week or so ago, and we've been using this system for nearly two years now. So yeah, we've got several thousand files that need to be relocated. I obviously don't have the time or the manpower to go through and manually move all this stuff. How should I go about doing this? A batch file? Would robocopy work? Our vendor says the beta release we're installing next week will fix the issue, but does nothing about the files that are currently in the wrong location.
N2IT wrote: » I've used Robocopy and XCopy in a similiar situation.
arwes wrote: » Thanks for the suggestions guys. I'll test some things out this afternoon and see what happens.
N2IT wrote: » Let us know.
robocopy c:\TEMP\Attachments\Other /s c:\TEMP\Attachments\Images *.pdf /mov /mir
Claymoore wrote: » Leaving both R and W at their defaults means robocopy will retry a copy for 30 million seconds before giving up and moving to the next file.
Claymoore wrote: » Careful with that /mir switch. That will delete folders on the destination that do not exist on the source. Any script that has the potential to do a mass delete makes me nervous. Having run some large robocopy jobs during SAN and disk migrations, and there are some other switches that I recommend:Robocopy Syntax, Command Line Switches and Examples My Digital Life/Rx for failure retries. Default is 1,000,000 - you want something more like 5/Wx seconds to wait between retries. Default is 30, 2 is probably better. Leaving both R and W at their defaults means robocopy will retry a copy for 30 million seconds before giving up and moving to the next file./LOG:file file for logging. Someone always asks if everything was copied. Let them look through the log and they won't ask again./E copies all subdirectories including empties. This is like the /MIR but without the /PURGE deletion side effects. robocopy source destination /move /r:5 /w:2 /log:robo.log You may not need the R and W with the MOVE option, but I usually copy files and had have had files with long filenames mess up an entire evening's worth of work. Of course, Step 1 is to do a backup before you start moving files around.
Use code EOY2025 to receive $250 off your 2025 certification boot camp!