Hiding Files Via Automator Workflow

Is there some way I can make an Automator workflow that will hide a file/folder?
Thanks,
Mason

Found my solution over here.

Similar Messages

  • Setting up system wide EQ via Automator workflow

    hello,
    many people might have tried to set up a system wide eq, which is not as easy on mac as maybe windows. now i figured it out by using soundflower and AU lab - i'm sure there are threads about this already.
    so when i'm say watching a movie late at night and dont want to disturb the neighbours i plug in the hdmi cable of the telly. then i need to go through the rigmarole of changing the sound preferences, starting soundflower and AU lab and load an AU lab preset that i made including the EQ settings, that cancel out the annoingly loud bass frequencies. how do i automate this workflow with automator? better yet could it be triggered by hooking up the hdmi cable? in reverse i need a workflow that changes the settings back for when the laptop stands alone.
    obviously i've tried recording what i do, but automator somehow cant handle the part of getting into system preferences. and i also dont find options in automator for various system preferences menu items.
    can someone please please give me a tip how to make it work. id be really happy!
    thank  you!!

    "does anyone have any idea how to get into the system preferences in automator? "
    Yes:
    Launch Application > System Preferences
    But realize that getting into a particular preference pane and clicking buttons via Automator will likely require an AppleScript solution. Watch Me Do does work, but the action is quite finicky and often misunderstood. WMD doesn't track and target buttons or icons. It targets screen location. If items on your screen move--sometimes by as little as a pixel--WMD will fail. No fault of WMD; it's just the way the action functions.
    You may want to repost your question in the AppleScript subforum: https://discussions.apple.com/community/mac_os/mac_os_x_technologies

  • Select old files in automator workflow

    I am new to automator and wanted to create a simple workflow that would delete old files (4 weeks old) in my downloads directory, but I can not see how to select old files using the find files action? Is this possible? I tried to use the before selector but it only seems to let you use a hardcoded date, can you paramertise it? (Appreciate I can do this by running a script and using something like the find command but wanted to see if this is possible in automator?)
    thanks
    Andy

    I just tested the following workflow and I think it gets where you want to go. Open Automator and click on the Files and Folders section of the Library. I used the following actions:Find Finder Items
    and Delete Files. Drop them into Automator in that order.
    Configure the Find Finder Items Action using the drop down menus. Set "Where" to the location of your Downloads folder. Set whose so that "Date Modified" is "This Month" In the Delete Files action decide whether you want a confirmation dialog to appear.
    I recommend testing it in Automator without the Dele action in place until you are sure the parameters are only deleting files you want to get rid of. (Look at the results section of the first action for the names of the files it finds). After the delete action is in place this workflow can be saved as as application or as a plug in for either iCal or Finder. As Part of iCal it could easily be set to run on a specific day each month.
    use at your own risk. this has had limited testing.

  • How to apply multiple automator workflows to one file

    Hi everyone,
    I've set up a few workflow applications to automate the process of making packshots from PDF files. The way those roughly work is they create a temporary copy in a folder, open a Photoshop droplet that executes all the actions on the file, and then save the finished product in a "finished" folder.
    However, we frequently need to deliver multiple packshots made from the same file. I was asked to make one automator app that allowed us to drop the PDF version on it, resulting in the multiple types of packshots in the "finished" folder, together with the original PDF.
    The way I have this set up right now is as follows:
    1) Copy the original PDF file to the "finished" folder
    2) Execute the first automator app
    3) Execute the second automator app
    This seems simple enough, and does work in 10.6.8. When I try it on a different computer in our studio though, with 10.7 installed, I get various errors:
    - Sometimes it says an error occured within one of the automator apps, while the app works fine when running it seperately (on all computers).
    - Sometimes it says something like "An error occurred while converting the data" when moving on from the first application to the second application
    - Sometimes I'll get an error message in the log, saying:
    *** -[_NSArrayl objectAtIndex:]: index 0 beyond bounds for empty array
    What I got from this is that it's actually not getting the right input it requires (or not getting any input, since it's an empty array). However, the previous task is set to "return the task input" (our systems are Dutch so excuse me for any discrepancies in translations please), and the resulting output that I get seems to be what I want the next automator application to use. Below is a screenshot of the error message:
    What I've tried:
    - I read somewhere that the newer versions of Automator require the action "Retrieve selected finder items" between them. I've tried using this in various ways (between all other actions/tasks, only before the second application to be run and before both applications to be run), but with no success. The problem I have with these is that, during the applications, it moves the files around, thus apparently selecting those folders as well.
    - Building an entirely new workflow on the newer system
    - Using "Start application" instead of "Execute Automator workflow". This results in Automator saying that it did execute the workflow while nothing happened.
    - Using "Ignore input" for the second application. This also results in Automator saying that it executed the workflow while nothing happened.
    So right now, I'm pretty stumped as to how to get this combination of apps to work in 10.7. Any solutions or workarounds are most welcome.
    Thanks in advance!

    Yes, angelanna. You can merge or split your video file via FCP sequence.
    ahaah, maybe I think angelanna would like to get the resulting file with MTS format because he mentioned “No need to be compressed”. Are you asking for this, angelanna?
    If so, a simple MTS files managing and editing tool  is needed. Maybe you can have a try the Mac version of Aunsoft Final Mate for managing HD camcorder footages. I just downloaded its free trial version and it offers a simple way of garping footages directly  from camcorder. And also it provides a attractive feature to join flawlessly and split accurately native MTS files for video file output with original MTS format.
    Maybe this is the tool cwhich an help you out, angelanna.
    Enjoy your video.

  • Getting File Name in Automator workflow - combine PDF

    I am using Automator to combine 2 PDF files.
    I would like to inherit one of the file names in the new PDF and append a standard text to the front of the file name.
    I am not sure how to do this. I can combine the PDFs the way I would like, but I am not sure how to plick the file name.
    my workflow is as follows.
    Folder Action targets folder where 1st PDF is added(I want this FILE NAME).
    Ger Specified finder item selects 2nd PDF to be combined.
    Sort Finder Items makes sure the new PDF pages are ordered properly.
    Combine PDF Pages combines the pages.
    Move Finder Items saves the files where i want it.
    Name single item is whre i thought to add my standard text plus the variable of FILE NAME.
    Open File in mail to set up my email.
    Anyone can help with this?
    thanks,
    Aaron

    Here is an automator workflow that does something similar so I believe you can adapt to your needs.  This workflow is setup as a service workflow. It will combine PDFs in the order in which they are selected/clicked via the Shift key.  The default name of the combined output file will be the name of the first file clicked.  Automator can be activated by CTRL clicking any of the selected PDFs.
    1. Service receives PDF files in Finder
    2. Automator Action: Run AppleScript
    on run {input, parameters}
              display dialog "Files will be combined in the order selected via the Shift key" as text
              return input
    end run
    3.. Automator Action: Trim input items
    keep the first one
    you will need to download and install this autotmator action from here:
    http://www.menace-enterprises.com/Files/Automator/Actions/Trim%20Input%20Items.d mg
    4.  Automator Action: Run AppleScript
    (* Note & Definitions
    This Applescript extracts the basename of the first selected file without its .pdf extension
    "path_basename_ext" is full path and name, e.g. User/desktop/file.pdf
    "NmExt" is filename with extension, e.g. file.pdf
    "baseName" is the base filename without extension, e.g. file
    "Ext" is the file's extension, e.g. pdf
    on run {input, parameters}
              set path_basename_ext to input
              tell (info for path_basename_ext) to set {NmExt, Ext} to {name, name extension}
              set baseName to text 1 thru ((get offset of "." & Ext in NmExt) - 1) of NmExt
      baseName
              return baseName
    end run
    5.  Automator Action: Set Value of Variable
    define baseName as the variable
    6.  Automator Action: Get selected finder items
    Options: check ignore input
    7. Automator Action: Combine PDF pages
    choose Combine by appending
    8. Automator Action: Move Finder Items
    choose To: Desktop
    Options: check show this action when workflow runs
    9. Name Single Items
    choose Basename only to: baseName
    Options: check show this action when workflow runs
    10. Open Finder Items

  • Create Automator workflow/AppleScript to automatically move files within NAS

    Running iMac / Macbook Air (OS 10.9.5), having the Macs connected wireless to the same network as a Seagate Central (NAS). On the Seagate Central and the iMac I have specified a couple of folders which are bidirectional synced via "Sync folders pro", e.g. pictures/movies folders. As a family, we have several iPhones (4S and 5S) with dedicated folders on the Seagate Central / iMac. Having the Seagate Media app on the iPhones, we are able to upload (and thereby free iPhone memory) pictures/movies directly onto the Seagate Central (pictures/movies which then are synced back onto the iMac). However, when uploading pictures/movies from the iPhone to the Seagate central (via Seagate Media app), it is not possible to define a target directory, and the pictures are therefore uploaded to a dedicated directory. I therefore search for some workflow/script to automatically (when new pictures/movies are uploaded, or at a daily basis);
    - Search for pictures/movies within a specific NAS folder
    - Move the pictures/movies to another specific NAS folder
    - Delete all other files/folders within the NAS folder being searched
    New to Automator / scripting, so I hope you bear with me even if the questions are dumb.
    Is it possible to make the NAS recognize a workflow/script without starting the iMac and/or MBA?

    Ok, so I made it a bit further, now having the following Automator Workflow (iCal)
    1. Get requested clients (check for ignore input from this action)
    - afp://192.168.1.86/Public
    2. Connect to client
    - I end up with a mounted disc (Public folder). Note that I end up at the same folder even if using afp://192.168.1.86/Public/iPhone/Photos in step 1.
    3. Get specified Finder items (check for ignore input from this action - to avoid having the Public folder itself following the workflow)
    - Choose the subfolder Public/iPhone/Photos
    4. Get folder content
    5. Filter Finder items
    - Did not get any results by using arguments as "kind is picture" and/or "kind is movie"
    - Ended up using arguments as "name contains jpg", "name contains mov" etc
    6. Move Finder items
    - Destination folder: Public/Pictures/iPhone
    - I now successfully managed to transfer the pictures and movies from one NAS folder to another
    *** I now want to continue the workflow to delete all other Folders/Files on Public/iPhone/Photos ***
    7. Get specified Finder items (check for ignore input from this action - to have no existing input for the remaining workflow)
    - Choose the subfolder Public/iPhone/Photos
    8. Get folder content
    - Results no showing a folder and a file
    9. Move Finder items to trash
    However, I´m encountering a couple of problems with this workflow;
    Note1: If there are no pictures/movies to move (no output from #5 going into #6), the workflow will stop. Any suggestions on how to skip step #6 and go to #7 if there are no pictures/movies to move? Applescript within Automator? Setting up the workflow as iCal (regular basis), so would be nice if the workflow just completes without errors (i.e. still goes on with deleting other files on the folder, even if there are no pictures/movies to move).
    Note2: Step #9 result in a error "Finder could not move the specified items to trash". Has this something to do with a folder and some other file being attempted deleted from a NAS folder? Any suggestions for how to cope with this problem?

  • Automator Workflow Copying Files

    I want to create an Automator workflow that copy items to a destination folder but ignores files that already exist in the destination. I begin having trouble at the "Copy Finder Items" action where the only options are to replace existing files or create duplicates in th destination folder?

    My bad.
    Try this script instead:
    tell application "Finder"
              set source_folder to (choose folder with prompt "Choose the source folder:")
              set target_folder to (choose folder with prompt "Choose the destination folder:")
              if source_folder is not target_folder then
                        set the_files to every file of source_folder
                        repeat with each_file in the_files
                                  set file_name to name of each_file
                                  if not (exists file file_name of target_folder) then
      duplicate each_file to target_folder
                                  end if
                        end repeat
              else
                        display dialog "Choose different folders as source and target!" buttons {"OK"} default button 1 with icon stop
              end if
    end tell
    It does what the first one should have done - checks the name of each file against the files already in the source folder and only duplicates those which aren't already there.

  • AppleScript to skip Automator workflow step - when no files are provided

    My current Automator workflow:
    Get Specified Finder Items (path to folder auto-populating with images from a camera)
    Get Folder Contents
    Sort Finder Items - by Creation Date in descending order (gets oldest item first)
    Limit Number of Items - Limit to First 1 items
    Move Finder Items (If no items are passed to this step skip it)
    Loop - Automatically; Stop after 20 minutes; Use the original input
    What I am trying to accomplish:
    I'm trying to write an AppleScript to skip the "Move Finder Items action" when it is not supplied with any files (from the previous workflow step), moving on to the next step which is a loop to begin my workflow again.
    Big picture:
    I have a workflow, where I am moving files from one folder to another folder (one at a time). When the input folder is empty, Automator comes back with "No item references were passed to the Move Finder Items action (-50)"; which it should - because it is not passed any files. I would like to ignore this error (or skip this step) and continue with the workflow if no files are provided to the "Move Finder Items action". I currently have an AppleScript (see below) that stops the workflow when this error occurs, but I would like to have this flow continue, not stop.
    AppleScript:
    on run {input, parameters}
              if input is {} then error number -128 -- 'user cancelled'
              return input
    end run
    Please help me create a script to skip this step, or to restart the Automator workflow when no files are passed to  the "Move Finder Items action".

    I'm not aware of a way to do this with a workflow saved as an application, but Automator is scriptable, so you can manipulate a workflow document.  For an example, build the follwing workflow:
    Ask for Text (just to get some input)
    Run AppleScript:
    on run {input, parameters}
      set currentAction to index of current action of front workflow -- the most recent completed action
      if input is {} then -- if no input then disable the following action
        tell Automator action index (currentAction + 2) of front workflow to set enabled to false
      else -- enable it
        tell Automator action index (currentAction + 2) of front workflow to set enabled to true
      end if
      return input
    end run
    Ask for Confirmation (just to show a dialog when enabled - this action will be enabled/disabled based on the text input)
    Loop
    You can also use action names, but I think it is less confusing to use indexes, since names can be edited and an action can be used more than once.

  • Automator workflow help: Moving files

    I am have trouble with an automator workflow. My ultimate goal is to create a image capture plugin that will create a dated folder with two subfolders for 'PNG' and 'JPG' files. Thus far I've been able to get the creation of the folder hierarchy I'm trying to create but when once action to import files from my device pulls the files I want I'm having trouble sperating the two file types into there subfolders.
    As it stands my work flow consist of the following actions and variables:
    *Image Capture plugin work flow*
    1. New Dated Folder (Action)
    2. Set Value of Variable (Variable)
    [Variable: 'Folder' So that I can ref back to this variable]
    3. New Folder (Action)
    [Folder name: 'PNG' using the 'Folder' variable to store this new folder]
    4.Set Value of Variable (Variable)
    [Variable: 'PNG']
    5. New Folder (Action)
    [Folder name: 'JPG' using the 'Folder' variable to store this new folder]
    6. Download Pictures (Action)
    This is the point in wich I get stuck.
    I've tried a few Files & Folders actions but I'm unable to parse by file extension.
    (I've tried both Filer Finder Items and Find Finder Items actions set to the file extension but keep pullling all my files to one sub folder or the other.)
    Any advice would be much

    The Filter Finder Items action should do it - for example, get the original items (and save for later), filter/move one set of items, get the original items back and filter/move another set of items, etc.  Be aware that the period is not a part of the extension, and watch out about mixing previous results into the current set if input items.  Each action has an Ignore Input option (where appropriate) - for example, when getting the original items from a variable, ignore the input so that the previous results (e.g. the path of moved items) don't get mixed in.

  • Old Toad's automator workflow to backup Library6.iPhoto database

    Dear Old Toad,
    I just today downloaded your workflow to backup the iPhoto database file, and am having problems making it work.
    When I run it, either from the dock or the script menu, it launches Automator but then closes without doing anything. I don't get a confirmation screen, and no copy of the database is created.
    So I opened it in Automator to see if editing it would help, even though my library is already named iPhoto Library and stored in user/pictures. When I dragged it onto the Automator window, there was only 1 action (Get Specified Finder Items) instead of the 4 that show up in the ReadMe. When I dragged it onto the Automator app to open it, I got nothing.
    I downloaded it via Firefox 3.0.1 and got a 1.1MB zip, and I tried downloading it twice in case it had corrupted in the download, but no change with the second try. Downloaded from here:
    http://web.mac.com/toad.hall/ToadsCellar/ToadsCellar.html
    Running OS 10.4.11, iPhoto 7.1.5, on a G4.
    Something else I can try?
    Thanks,
    Daiya
    Message was edited by: Daiya

    Yes. Run the application like you would use the Save command in other applications, often. Running it again will overwrite the current backup copy with a new backup that will include all changes you've made to your library, new pictures, deletions, slideshows, books, etc.
    I suggested keeping it in the dock so you can quickly run it after any changes you've made to the library. Being in the Dock makes it more convenient than having to go into the Application folder and launching it from there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • AppleScript error -609 in Automator workflow

    I created an AppleScript on one computer and incorporated it in an Automator workflow. The script works perfectly well stand-alone or as part of the workflow.
    Then I copied both files to a headless computer via VNC. I adjusted the workflow to look at the new location of the script, and the script itself to look at the new location of the file it's processing. Now, on that second computer, the script works perfectly well by itself, but I get AppleScript error -609 Connection Is Invalid if it's run from the workflow.
    For testing purposes I reduced the script to its simplest expression:
    tell application "Finder"
    end tell
    and it's still generating the error.
    Strangely, from the workflow the full script does what's it's supposed to, but the workflow stops because of the error. The error appears even if this script is alone in the workflow. Does anybody know what it means?

    That error means that the script wasn't able to communicate with the targeted application properly, which can happen if the application crashes while the script is running. If that error doesn't cause any problems, it's appearance can be suppressed:
    try
    (your code)
    on error number -609
    end try
    This construct will not execute any code on or after the line which produces the error.
    (32099)

  • Cannot manually select Automator workflows in iCal

    I know That the Way, Apple intends that we create an Automator workflow as an iCal alarm is to create a new iCal alarm in Automator, and once you save it it automatically creates a new event in iCal. Unfortunately, that's not the way I want to work… I already have dozens of iCal alarms configured, and I'm trying to prep them for Mountain Lion: the currently open AppleScript's but all of my Apple scripts need to be converted to Automator workflows for Mountain Lion. So I was hoping to quickly duplicate previous iCal workflows, then reselect them from within existing events in iCal. Sadly, all of my iCal Automator workflows appear as greyed out in my File Open dialog when attempting to select a new file to run within my iCal alert.
    I don't want to have to delete all of my iCal alarms and start over creating them anew. Perhaps I am missing something simple?

    https://discussions.apple.com/docs/DOC-4082
    http://www.macworld.com/article/1165641/how_increased_mac_security_measures_will _impact_applescript.html
    https://discussions.apple.com/thread/4139323?start=0&tstart=0
    according to the first link I can save the applecript as an application. It doesn't answer why my automator workflows are greyed out when I try to select them, but maybe I'll just try saving as applications... sounds simpler.

  • Getting path of parent folder of a file during a workflow execution

    How can I get the parent folder/directory of a file during the execution of a workflow? I cant't find any actions i Automator that will give me this.
    I want to make a general applicable automated workflow. The path can not be hardcoded in the workflow as different files and folders will be worked on each time the workflow is run.
    The input to the workflow is a file or list of files. I want to be able to retrieve the path of the parent folder of these files at runtime.
    Will I have to do this through AppleScript? If so, then how?
    (in case you have seen my first post on this; it seems I wasn't specific enough so people didn't understand what I want to do. Therefore this second post. Sorry for the iconvenience)

    Hi anilsen!
    If all selected files are within the same folder, it would be like this:
    For example:
    • Get Specified/Selected Finder Objects
    • Run AppleScript
    on run {input, parameters}
    tell application "Finder"
    set output to (container of item 1 of input) as alias
    end tell
    return output
    end run
    Spazek

  • Import and rename photos via Automator and ExifTool

    Hiya,
    Just finished my work on a Automator workflow in order to import and rename photos from a portable hard disk.
    I had the problem that my portable hard disk (with integrated card-reader) was not recognised by Image Capture or Aperture. Therefore I couldn't import my photos straight away into Aperture.
    Another problem I had was that Aperture doesn't rename photos while importing. Whereas other Automator actions offer this feature, they all didn't fulfill my requirements - yeah, I can be very fussy
    That's why I started initially to write a Perl script based on ExifTool in order to copy and rename photos to my liking. Once this was done and very much in use, I started to put it into an Automator action with a little AppleScript around it.
    Eventually, I initiated the entire Automator workflow with the Check For Disk action.
    More information and the files needed can be found on my website http://photography.stephanjaeger.eu/2007/03/improve-your-digital-photography-wor kflow.html.
    The only drawback of this script is that only one camera is supported. At the moment, I work on a solution to support several cameras.
    The Perl script can used by itself, if you feel comfortable in using the Terminal.
    I hope you find the information and the Automator action helpful.
    Any feedback appreciated.
    Best regards,
    Stephan Jaeger
    Mac Pro   Mac OS X (10.4.8)   2.66 GHz, 4 GB RAM

    Brian,
    Thanks for giving it a try. Let me know how you get on!
    If you have any problems, please don't hesitate to contact me.
    By the way, you don't have to use an external hard disk. You could replace easily the first step in that workflow with an other action, such as defining a folder that should be monitored, or selecting manually a folder that contains photos.
    I hope that I find some time over the week-end to make some changes to the script. I will set up as well a page on my web site with more details.
    All the best,
    Stephan

  • Running an automator workflow w/o opening automator

    Is it possible to run an automator workflow - (check addressbook for birthdays - then send a card) once a day without having to remember to open automator everyday (the whole point is I forget to do this in the first place, so I'm hoping automator can just take care of it). but I don't want to have to leave automator open all the time... I think I read something about using applescripts, but I havent played with them at all...
    Thanks

    Hmm, your idea sounds about right. If you created the birthday event in iCal yourself (i.e. it's not the Birthday calendar iCal provides from your Address Book), then you can add an alarm to it. In that case, you have some nice options and effects.
    Since you would be adding the alarm to the birthday event, then the Automator workflow won't run every day and will only run when the birthday occurs. As for options, you can set the alarm for the event to activate at a specific time in reference to the event, e.g. the day before or perhaps around noon. (That is somewhat dependent on whether you made the event an all-day event or for a certain time, but it works either way and is pretty self evident.) You could also have it automatically occur a day late or even a week late.
    As such, you might consider making the workflow be more specific. You could create a workflow specifically for that birthday, and in that case you'd just specify a person from your Address Book instead of searching it for birthdays. Just depends on how you want to approach it. Regardless, saving the workflow as plug-in in Automator will be the easy way to refer to it as an iCal alarm.
    You mentioned iCal popping up reminders and that's an example of what an alarm can do if you set it that way, so you're probably familiar with them. However, you won't see that when you set the alarm to open a file (as in this case) unless you set a second alarm for the event to show a reminder. To add more alarms to the same event in iCal, you can click on the name "alarm" in the info drawer and it will give you a menu to add another alarm. You can also remove extra alarms in the same way. Wasn't sure if you knew that already.

Maybe you are looking for