We have a Windows 2003 server with an NTFS filesystem. In it are log files from our webservers (all of them get dumped in one folder on this particular server)
There are 1,500,000 odd files in one folder (let's call it e:\logs\store1)
There are now too many files for an application we use to process / convert these log files to deal with.
I am after a script to go through the folder and split it up into sub folders of 5000. That is, go through one by one and copy the first 5000 files to e:\logs\store1\1\ the next 5000 to e:\logs\store1\2\ etc.
I am unsure how to do this, hence my post.
I would appreciate any help anyone can give me. Poor old windows explorer falls over when dealing with this many files in one spot!
Thanks in advance!