Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SeriesOne

macrumors newbie
Original poster
Sep 3, 2017
2
0
The problem with Applescript is that it has a long learning curve before one can do anything remotely complicated. I have been able to get a few ridiculously simple scripts working in automator, but I need something that would probably require long-term study - which isn't worth the time investment (for me) since I will not perpetually need new functions.
Consequently I need an Applescript expert to give me a detailed script (which I can adjust myself) for the following:

***********************************
Applescript for an automator app:

Find: all the files in a specified folder (including subfolders) meeting both the following rules:

Specific filetype (.rtf for example)
Date last modified within the last N days (10 for example)

Then: Write aliases to all those found files to another specified folder.
***************************************

In theory the built-in utilities in automator should be able to handle that, but the 'find finder items' function is unreliable; it fails to handle date searches properly, often missing recently modified files.
A smart folder in the finder could handle this also, but is not convenient for what I want.
If I had a script that would do the same thing with a smart folder, i.e., write aliases of the files found to another specified folder, it would also be helpful but I suspect that would be a more difficult script to write. So go with the above.
 
Last edited:
I'd suggest ditching AppleScript for that and using bit of shell script (try stuff out in Terminal). Take a look at the 'find' and 'ln' commands.

Finding files
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/find.1.html

Making aliases ("links")
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/ln.1.html

You can run shell scripts just as easily as AppleScript from Automator.


Thanks for the suggestion(s) superscape, but I think if I were to get involved with shell script, I would be dealing with yet another long learning-curve. I have no time since I use my Mac for mostly one specific purpose and the script I want would be an added convenience. The amount of time learning any script language would negate the added convenience I would get. What I need is an almost complete script done by someone who already knows how. The reason I want Applescript is because I would have at least some idea how the code works when I see it.
 
Thanks for the suggestion(s) superscape, but I think if I were to get involved with shell script, I would be dealing with yet another long learning-curve. I have no time since I use my Mac for mostly one specific purpose and the script I want would be an added convenience. The amount of time learning any script language would negate the added convenience I would get. What I need is an almost complete script done by someone who already knows how. The reason I want Applescript is because I would have at least some idea how the code works when I see it.


Hazel will do what you want. And it can go into subfolders.
Screen Shot 2017-09-07 at 01.22.37.jpg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.