Hi,
bout to teach myself applescript and bought the developers reference manual and before I plunge into it I'd love to know if my script structure makes sense. I'm not a real hercules-esque coder, but I know several languages quite well for work, etc...
what I want to do is have files of various different MIME formats (jpg, png, mov, mp4, etc.) move moved into specified folders automatically. To start I want to have my Desktop actively move files into specified folders based on their MIME type. so images go into the ~/Desktop/Media/Images directory; movies into the movies folder within the /Media folder. You get the idea.
my outline is as follows:
First define all parent folders and subdirectories and specify which MIME type each folder is linked with. (create folders before scripting).
tell finder to scan desktop folder with some sort of IF loop that scans for filetypes based on either MIME type or file extension.
tell finder app to move the recognized filetypes into their requisite folders.
End script...
result should be that it cleans up everything and moves the files on my crowded desktop into folders so they can be easily found. If you have any tips from personal experience would love to hear them so i can learn from others who know much more about applescript.
one thing I'm not clear on is how I can have the Desktop folder sort files by simply putting an image file on the desktop and then having it moved automatically to the images folder. I'd rather not have to run the script everytime I need to organize files. If this is within the realm of "all-nighter script marathon" I'm in, but if It will require a buttload of code and days of digging into the applescript dev manual then screw it.
Cheers
bout to teach myself applescript and bought the developers reference manual and before I plunge into it I'd love to know if my script structure makes sense. I'm not a real hercules-esque coder, but I know several languages quite well for work, etc...
what I want to do is have files of various different MIME formats (jpg, png, mov, mp4, etc.) move moved into specified folders automatically. To start I want to have my Desktop actively move files into specified folders based on their MIME type. so images go into the ~/Desktop/Media/Images directory; movies into the movies folder within the /Media folder. You get the idea.
my outline is as follows:
First define all parent folders and subdirectories and specify which MIME type each folder is linked with. (create folders before scripting).
tell finder to scan desktop folder with some sort of IF loop that scans for filetypes based on either MIME type or file extension.
tell finder app to move the recognized filetypes into their requisite folders.
End script...
result should be that it cleans up everything and moves the files on my crowded desktop into folders so they can be easily found. If you have any tips from personal experience would love to hear them so i can learn from others who know much more about applescript.
one thing I'm not clear on is how I can have the Desktop folder sort files by simply putting an image file on the desktop and then having it moved automatically to the images folder. I'd rather not have to run the script everytime I need to organize files. If this is within the realm of "all-nighter script marathon" I'm in, but if It will require a buttload of code and days of digging into the applescript dev manual then screw it.
Cheers