You are not logged in.
I am new to Automator/ Apple Script and tried to program something for a friend of mine:
Folder "Source" with changing amount of subfolders. Content: Pictures.
The Program should do the following task: Check Folder "Source" for content, copy (Picture) content to different Folder "Target", then erase Subfolders in Folder "Source". thats it....
What i managed to do by now is a folder action and/ or an automator program checking folder "source", copy the pictures to "target" and thats it. Whenever i try to add the action "afterwards delete content of folder "source"" it ends up in a) pictures are in the trash or b) pictures copied, subfolders still in folder "source".
Can someone help?
Btw, what i "programmed":
- ask finder object
- check content of folder "source" (with subfolders)
- filter objects (kind is not folder)
- move filtered objects to Target folder (and erase content of target folder before)
- check content of folder
- filter objects (any kind of content)
- move content to trash
I appreciate any kind of help - thanks in advance and i hope my english is "read- and understandable"
Hi. Welcome to MacScripter. (Somewhat belatedly, I'm afraid. The Automator forum doesn't get a lot of visitors.)
I can't get the filter action to work in Automator 2.6, but this works provided there's only one level of subfolders:
Ask for Finder Items. (Select "Folders" in the "Type:" pop-up.)
Get Folder Contents. (Leave "Repeat for each subfolder" unchecked.) Gets the subfolders.
Set Value of Variable. (Click the pop-up and enter a suitable name, perhaps "subfolders".) Memorises them,
Get Folder Contents. (Leave "Repeat for each subfolder" unchecked.) Gets the subfolders' contents.
Move Finder Items. (Set the destination folder.) Moves the contents to the destination folder.
Get Value of Variable. (Same variable name as above. Click "Options" and check "Ignore this action's input".) Gets the subfolders again.
Move Finder Items to Trash. Moves them to the trash.