|
|
Flatten a folder's structure via AppleScript
Stumbled across this thread while researching a script for reorganizing some really unwieldy folder structures and 30,000 files, Thought I'd post back with my results in case it's useful to any one. I decided on a shell script version; it ended up being much faster than the Applescript versions I tried.
My basic goal was to flatten all files to the main folders, but for the larger folders (containing up to 4000 files) I wanted to sort the files into alphabetical subfolders. I decided on running the script as a contextual menu item using OnMyCommand, so all selected folders in the Finder are passed to the script one at a time. So if you're using Applescript or Platypus to set up a droppable app or whatever you'll need to set up the folder handling. Note that I used a Macports-installed version of GNU mv (gmv) for moving files, since the default mv on my Tiger setup doesn't support the "--backup" option. The script moves any duplicates found to a folder named "Duplicate". Also any invisible dot files (like .DS_store) in the main folder should be preserved; any in subfolders will be deleted.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|