Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to move 1 million small files from one dir to several dir's?

Status
Not open for further replies.

techkate

Programmer
Feb 23, 2004
118
0
0
US
I need to perform a one-time move of about 1.2 million small files. The files could range in size from <1k to 50k.

All of these files were sitting in one archive folder, and the fact that there were so many files in that one directory turned out to be the cause in determining why a proprietary software solution was running much more slowly than it should have.

Since then I've renamed that archive folder as a backup just to get the files out of the way, temporarily. Now, I need to move them to an organized folder structure by date, within the main Archive folder.

I would move the files in groups by month, for about the past year or so. For example, files within the Archive_Backup folder w/ timestamps between 12/1/09 and 12/31/09 will be moved to Archive\2009\12_Dec. Files between 5/1/10 and 5/31/10 will be moved to Archive\2010\06_Jun.

I need to find a solution that would be least taxing on server performance, considering that it is a production server. I intend to run whatever script I can put together off-hours, probably overnight.

I am considering Robocopy, which I have experience with. I've also read up on RichCopy. Should I go with one of those or maybe there is a freeware utility out there that would do the trick better?

Thanks.

[small]"There was this sound, like a garbage truck dropped off the Empire State Building.[/small]

 
Personally I would use robocopy.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
I've used XXcopy to do something similar based on creation data. XXcopy is basically robocopy with more features.

Biglebowskis Razor - with all things being equal if you still can't find the answer have a shave and go down the pub.
 
Robocopy rules. I migrated an entire server using it, it keeps the file structure/permissions/attributes etc. It's really very good :)
 
I went with RoboCopy since I could let it run overnight (it took almost 10 hours to complete). I know RichCopy would have been faster, however I went with what I was most familiar with.

Thanks.

[small]"There was this sound, like a garbage truck dropped off the Empire State Building.[/small]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top