|
|||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
|
#1 |
|
Prospect
Join Date: Oct 2009
Posts: 3
|
Hi, Hayne-
You're right—I didn't get a full solution, but I did find a script that will create the folders from the filenames, and then move those files into each of the newly created folders. I still am having no luck with the second part of the routine, but here's the folder creation script for those who are interested: set chosen_folder to (choose folder) tell (a reference to my text item delimiters) to set {old_delim, contents} to {contents, "."} tell application "Finder" try set file_list to files of chosen_folder on error set file_list to {} end try repeat with this_file in file_list set folder_name to name of this_file if folder_name contains "." then set folder_name to ((text items 1 thru -2 of folder_name) as string) set new_folder to ((chosen_folder as string) & folder_name & ":") try get new_folder as alias on error make new folder at chosen_folder with properties {name:folder_name} end try move this_file to folder new_folder end repeat end tell set my text item delimiters to old_delim Eric |
|
|
|
![]() |
| Tags |
| applescript, filename, folder, sorting |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|