bobneumann Posted November 14, 2007 Share Posted November 14, 2007 I have a folder on a Win2k server containing 2.4 million files. I'd like to run a script that will go through the files, create subdirectories, and put those files into subdirectories, about 5000 or so per directory. The directories would be named serially. Any quick advice on the best general way to approach this problem? Thanks in advance, Bob Link to comment Share on other sites More sharing options...
weaponx Posted November 14, 2007 Share Posted November 14, 2007 My advice, fire the guy who put 2.4 million files into one folder. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 14, 2007 Share Posted November 14, 2007 I have a folder on a Win2k server containing 2.4 million files. I'd like to run a script that will go through the files, create subdirectories, and put those files into subdirectories, about 5000 or so per directory. The directories would be named serially.Any quick advice on the best general way to approach this problem?Thanks in advance,BobYou can still use _FileListToArray() and walk the resulting array to process the list. An AutoIt array can have up to 2^24 (16M) elements. You're not even up to 2^22 yet!If you just want to take them in batches of 5000 without any further logic, then FileFindFirstFile/FileFindNextFile might be even more straight forward. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted November 19, 2007 Share Posted November 19, 2007 I think he took my advice and fired himself! Sorry. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 19, 2007 Share Posted November 19, 2007 I think he took my advice and fired himself! Sorry.I hope he gave himself severance pay and a polite referral letter. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now