Automated file moving

May 11, 2014
1
0
4,510
Hi guys,
I have a large directory of files that I want sorted into sub-folders. The name of the sub-folder destination is part of each file name (delimited by underscores, so files look like somelargename_destinationfolder_possiblysomethingelse.ext) Is there a way I can automate moving files to the destination folder if it exists, or create the folder and move the file if it doesn't?

Thanks
Chris
 
Solution
Since you wanto use an interior part of the file name for the destination folder and, I assume, the preceding part is probably variable length, it would be best to do it in a scripting language. If it's a local drive (not a network drive or URL) it will be pretty simple for a programmer. If networtk drives are URL's are involved it will get more complicated.

Then you can run it manually by creating a shortcut to run the script or set up a scheduled task to run it at regular intervals.
Since you wanto use an interior part of the file name for the destination folder and, I assume, the preceding part is probably variable length, it would be best to do it in a scripting language. If it's a local drive (not a network drive or URL) it will be pretty simple for a programmer. If networtk drives are URL's are involved it will get more complicated.

Then you can run it manually by creating a shortcut to run the script or set up a scheduled task to run it at regular intervals.
 
Solution