I am trying to make a script to move each file to a folder in the root folder to include each subfolder. I do not want the new folder to just move it to the root folder.
I want to be able to select a folder, and then the action will be performed only in that specific folder.
The reason is the organization, my exact situation is that I have over TB films and there are files inside folders in folders. I want all these files to be in the root folder so that I can organize them as I see fit. I would also like to copy and delete instead of moving, as the study prompted me to believe that this is the best route.
Well, I couldn't get the script to work, but I found a link to a workflow that does exactly what I'm looking for:
http://www.macworld.com/article/1160660/automator_filesfromsubfolders.html
I updated above, keeping this section for historical purposes, everything between the dashed lines is what I would delete after editing
I tried redesigning this script below, which I found, but I just can't get it to work the way I want. Any help would be very helpful, I'm very new to scripting, and I came to the rock.
"" main_folder ( " " ) sub_folders main_folder sub_folders ( ) main_folder end tell
"Finder"
sourceFolder "MOVE ME" - "" ..
moveFilesFrom (sourceFolder)
end tell
moveFilesFrom (thisFolder)
"Finder"
set filesToMove thisFolder
aFIle ToMove
aFIle destFolder
( )
aFolder
moveFilesFrom (aFolder)
end moveFilesFrom
, aa, , , , .
script, adayzdone
set myFolder to (choose folder with prompt "choose the main folder")
tell application "Finder"
set myfiles to get every item of (entire contents of folder myFolder) whose kind ≠ "Folder"
move myfiles to myFolder
end tell