Copy link to clipboard
Copied
Hi all.
I have some folders downloaded from a server that have images in lots of sub folders. I need to extract all of these images out of the sub folders and place them in one single folder. I.e. 2013 folder = (contains) 87,000 folders which each contain 1 or 2 images.
Can anyone advise on a script or a way of doing this. Viewing everything from sub folders is not an option as it kills my machine..
Cheers!
Charlie
Copy link to clipboard
Copied
Hi Charlie,
giving away my secrets here <g>
If you are on a PC try this: Everything Search Engine
best file manipulator I've found with a command line interface, if you can write it or do it in c, c#, c++ you can do it with this little engine. Wonderful program.
I am sure it will be able to more than handle your manipulation.
Copy link to clipboard
Copied
‌If you're on a Mac, you can do this with AppleScript:
Tell application "Finder" to duplicate every item of folder "(path to folder)" whose size is greater than 4000 to folder "(path to destination folder)"
Your paths should be written as follows:
... Every item of folder "Disk Name/folder/sub folder/" whose size...
Make sure they end with a /
The part about the file size should make sure no folders are included, as it will only duplicate things larger than 4kb. I'm not at a computer now so I can't test this but I have quite a bit of experience with these types of scripts (I'm developing an app to sell on the Mac App Store that deals with file manipulation) so I'm quite confident this will work. Good luck, let me know if this works!