Trigger automator script when new file created

I want to create an automator script that will recognise when a new file is created (with a name that matches a particular pattern and in a certain directory) and mail that file to a predefined address. Is that possible?

yes, this is possible with a folder action. you can attach a folder action to the folder in question. it will watch this folder for new files and trigger when a new file is added. you can create an automator workflow and save it as a folder action plugin.

Similar Messages

  • File Sharing Permissions Problem When NEW Files Created

    My wife & I have a home office network setup for our business, and are having trouble with shared files over the network. We're both on Macs, and all of our client files reside on an internal hard drive in my Mac Pro. I've set her up as a "Sharing Only" user on my computer (which matches the username & password of her account on her iMac), and have properly setup file sharing in both the System Preferences, and in the directory itself that we want shared. I've also applied the permissions to all files & folders below the main folder, and she can view, open and save whatever she needs and it works great.
    *Here's where the problem comes in...* If either of us create a NEW file or folder, the other person doesn't have WRITE access to it (we can browse and open it fine). The second I go to update a file she created, it won't let me over-write it, and I have to go into the permissions for that specific file and give myself Read/Write access. I've experimented with "Groups", and assigned both of us a special group, and applied that group access to that directory, but it doesn't make any difference when a NEW file or folder is created - it doesn't copy the parent directory permissions to itself, it makes one of us the owner, and nobody else has access.
    Is there any way around this? We're both constantly creating new files, and it really hampers our workflow to have to keep re-applying file permissions every time one of us creates something new. Ideally, any new files created within that main client folder would automatically have the same permissions as the parent directory. Any help would be greatly appreciated! Thanks!!

    Here's how to do this with Access Control Lists.
    1) Go to System Preferences -> Accounts. Unlock the padlock. Click the + button. Make a new group. Call this group "sharing" for the purposes of this exercise. Add the users you want to the group.
    2) Make a new empty folder in /Users/Shared. Call it "sharefolder".
    3) Log in to an admin account and paste all three of these lines at once into Terminal:
    sudo chmod +a "sharing allow delete,chown,list,search,add_file,\
    addsubdirectory,delete_child,file_inherit,directoryinherit" \
    /Users/Shared/sharefolder
    4) From now on, any files you create or copy to the sharefolder or to any of its subfolders will inherit read+write permission for all users in the group. If you have any existing files that you want to move into the sharefolder, a simple move by drag & drop won't cause the permissions to propagate. you need to hold down the option key while dragging them in. This will copy them over, ensuring that the ACL permission is properly inherited.
    One other caveat: Files created by a small number of OS X apps won't inherit the permissions properly if saved directly into the ACL folder hierarchy. TextEdit is one such app. Save TextEdit files in a temporary location first, and then copy them in. Then they will have the correct permissions.

  • Is it possible to trigger a script when a file is opened.

    I have a simple script that I need to run when a file is opened in illustrator(cs5) on windows 7. I tried adding the script to the "startup scripts" folder but that only executes when a new instance of illustrator is started. If illustrator is already open and I go to "file/open", the script doesn't run. Any suggestions?
    Many thanks,
    CRS

    Thanks for the follow up. I think the real solution is training our artists to pay more attention to their work. Some of our artists were saving their files in RGB color mode instead of CMYK which was obviously causing color problems. I was wanting a script to check the color mode of each file upon 'open' and notify them if it was in RGB, but truthfully they should be paying more attention and catch the problem before the art is sent to production. A work-around like that wouldn't solve the real problem anyway.
    Thanks again,
    CRS

  • Db trigger that fires when new user created?

    I need to set up a trigger so that whenever a new user is created in our application, user info should be inserted into an application table.
    So I assumed that a trigger on CREATE DDL event will do the trick. But when I looked up trigger syntax, it asks me the schema name on which I want to define the trigger.
    Is it possible to do it at all?

    create or replace trigger create_user_trigger
      after create on database
    begin
      if ora_dict_obj_type = 'USER' then
        -- action
      end if;
    end;
    /

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

  • New files created with no group-write permission

    We have OS X set up in Standard configuration.
    We have one workgroup. When someone creates a new file in this workgroup, it is saved with permissions of "Username: Read/write", "Workgroup: read only", "Everyone: read only".
    How do I change this to something sane? (i.e. Username: Read/write, Workgroup: Read/write, Everyone: No access)
    Thanks in advance.

    +When someone creates a new file ... (it gets POSIX) permissions of "Username: Read/write", "(group): read only", "Everyone: read only".+
    This is perfectly normal.
    *Two Permission Models* First, you probably already know that Mac OS X uses two models for permissions when determining effective access for files and folders. The two models are Standard POSIX (UNIX) permissions and Access Control Lists (ACLs).
    *POSIX Permissions* POSIX permissions are very simple, and have some limitations. They consist of three "fields": an owner field, a group field, and an everyone else field. (There's also a special permissions field, but we'll skip that for this discussion.) The POSIX owner is always a user; it cannot be a group. The POSIX group represents one group, and the everyone else field covers any user who is neither the owner nor a member of the chosen POSIX group.
    POSIX uses three bits to describe the access returned for each field. There is a bit for read, one for write, and one for execute (for folders, this means traverse, or see contents). Thus, there are eight possible POSIX permission combinations:
    *POSIX Access Type ................... Binary Bit Representation ........... Decimal Bit Representation*
    No Access .......................................................... 000 ......................... 0
    Execute Only ...................................................... 001 ......................... 1
    Write Only .......................................................... 010 ......................... 2
    Read Only .......................................................... 100 ......................... 4
    Write & Execute (Drop Box folder)....................... 011 ......................... 3
    Read & Execute (Read-only folder) ..................... 101 ......................... 5
    Read & Write ...................................................... 110 ......................... 6
    Read, Write, and Execute (Read/write folder)...... 111 ......................... 7
    It's helpful to know these decimal representations, because they provide a quick shorthand for describing POSIX access. Typically, we use the decimal shorthand like this: (decimal bit representation of the POSIX special permissions field)(... of the POSIX owner field)(... for the group field)(... for the everyone field). Thus, a combination like owner read, write, and execute, group read & execute, and everyone else read & execute is 0755: Special permissions are 0 (000 binary), owner is 7 (111 binary - read, write, execute), group is 5 (101 - read and execute), and everyone is the same as group (101).
    *How POSIX Access is Determined for a Connecting User* In determining POSIX access to a file or folder, a user can only be "given" the access of POSIX owner, POSIX group, or POSIX everyone. The system first checks to see if the connecting user is the POSIX owner; if so, the user gets the permission bits assigned to the owner field. Otherwise, the user's primary group is compared to the POSIX group assigned to the file or folder; if they match, the user is given POSIX group access. If that fails, then the POSIX group is queried for a list of member users to see if the connecting user is a member of that group; if so, the user is given POSIX group access. If all three fail, then the user is given access assigned to everyone else.
    *How POSIX Permissions are Set for Newly-Created Files and Folders* When new files or folders are created within a parent, the following determines their POSIX permissions:
    1. The POSIX owner is the user who creates the file or folder.
    2. The POSIX group is set to the group of the folder's parent.
    3. POSIX permission bits (owner, group, everyone else) are set by the umask. The umask is 0022 by default, so default POSIX bits are 0755 (0644 for files) - owner read, write, group read, everyone read.
    If the POSIX permissions were the extent of the permissions model, then we would have to either modify the umask (on each client) or adjust the server's behavior via an Inherit Permissions scheme. The first option is insecure, because you cannot just modify the umask for a particular server's share point - it would apply system-wide on the client computer, even for local files. The Inherit Permissions via POSIX was the method used by Mac OS X Server 10.3 and earlier.
    Fortunately, you don't have to do either. That's where ACLs come in to play:
    *ACL Permission Model* Access Control lists are just what you'd expect: a list of entries that describe what a user or group can or cannot do. Unlike POSIX, you can have a virtually unlimited number of ACL entries (or ACEs). Each ACE can apply to just a single user or a whole group of users. ACLs support two modes of operation, Allow or Deny, along with 24 unique controls arranged in four categories:
    *Category ... Controls for Files Only ....... Folders Only .......................................................... Files & Folders*
    Read ............... read and execute .............. list and search ........................................... readsecurity, readattr, readextattr
    Write ............... write and append .............. delete_child, add_file, add_subdirectory .... delete, writeattr, writeextattr
    Administer ............................................................................... ...................................... chown & writesecurity
    Inherit ............ file_inherit ......................... directory_inherit, limit_inherit .................... only_inherit
    *How ACL Access is Determined for a Connecting User* Since each ACL entry can be either Allow or Deny, the system makes two "tallies" for the connecting user: one for applicable Allow ACEs and one for applicable Deny ACEs. An ACE applies to a connecting user only if the ACE is specifically for that user or if the user is a member of the group to which the ACE applies. The tallies are created by adding all applicable ACEs for each Allow/Deny category. Thus, the ACLs return two things: a list of deny controls and a list of allow controls.
    *How ACLs are Inherited to Newly-Created Files and Folders* When new files or folders are created within a parent, the following determines their ACL permissions:
    1. If the file_inherit control is part of any listed ACE, that ACE is applied to newly-created files therein.
    2. If the directory_inherit control is part of any listed ACE, that ACE is applied to newly-created folders.
    *How ACLs and POSIX Permissions Work Together* The access level returned from POSIX and the two ACL tallies are combined in the following way to determine the effective permissions:
    *Effective Permissions = (POSIX Access) + (ACL Allow tallies) - (ACL Deny tallies)*
    For each unique connecting user, the effective permissions will be calculated in the previous way.
    *Solving Your Problem* You can easily use effective permissions to your advantage to solve your problem. Simply enable ACLs on the volume that houses your troublesome share point, and add a new ACL entry for the desired workgroup, granting it all read, write, and inherit controls. This way, when users create new items in the share point, they automatically inherit that ACE. You'll also have to propagate permissions for all items that are already inside of the share point after you've added the ACE.
    Here's an easy way to do both with an ACE granting writers_group read/write/inheritance on some share point using chmod form the command-line:
    sudo chmod -R +a "writers_group allow readattr,readextattr,readsecurity,list,search,read,execute,\
    writeattr,writeextattr,delete,deletechild,add_file,addsubdirectory,write,append,\
    fileinherit,directoryinherit" /path/to/share_point
    Hope this helps!
    --Gerrit
    Message was edited by: Gerrit DeWitt

  • When Photoshop CS6 is invoked from PSE 11 Organizer why is a new file created with _edited-1 appende

    I just converted a large PSE 10 catalog to work with a downloaded trial version of PSE 11.  When I brought up the Organizer and clicked on the Editor button I selected Photoshop CS 6.  At that point the Organizer created an image stack with a new file on the top of the stack that had a file name that was the original file name with "_edited-1" appended to the end of it.  Is there any way to avoid this?  For me it is going to create a tedious step to delete the original file and rename the new file after editing.  For probably 98% of my editing I will use only the Adobe Camera Raw editor on my imported raw files (Nikon's .nef).  ACR puts the editing data in a sidecar .xmp file so there's no need to protect the original file from be mistakenly replaced by an edited version.

    That's not a new behaviour : in old versions choosing the external editor did create a copy in a version set.
    I don't have CS6, so I can't be specific, but I wonder why you should open CS6 if most of your images can be edited in ACR. For them, you only need to click 'Done' and that saves the edits in the xmp sidecar file. I guess most of the remaining files could be processed in the PSE11 editor and saved in any image format (jpeg, tiff, psd...). Only a minority would have to be processed in CS6***, and in that case, creating a new copy in a version set seems quite reasonable.
    Edit:
    *** in CS6 or the full ACR version of CS6. In my case, it's very rare that I need the other tabs in ACR.

  • Trigger a Mail when no file is placed

    Hi Everyone,
    How can we trigger a mail when no source file is placed for the file adapter to pick in a given time?
    Regards,
    Raghu

    Hi
    I m not sure wheter this will work or efficient.
    Cant you use operating system command option ?
    Like,,,, checking whether the particular file exists, if not create a blank file or new file with a different predefined content using Operating System Command option (using scripts or soemthing). and creating a separate file-mail scenario for this new file

  • Automator error when no files exist to move

    I have a very simple automator script set up in Snow Leopard:
    Find Video files in "Downloads" folder that are larger than 50 MB
    Move those files to the "Files to Convert" folder
    The script works perfectly when there are video files in the folder to convert, the problem is it throws an error when there are no files. I receive a "The action move finder items encountered an error" "The action move items was not supplied with the required data"
    I can see why the script is failing but do not know how to tell it to ignore the error if no files are found.
    Any thoughts?

    Put a step in there to see if there are any files ≥50 MB. If not, quit the workflow. If so, continue. For AppleScript details, post to its forum under OS X Technologies or try the Automator forum under Mac OS X v10.5 Leopard
    BTW. your profile shows Tiger and you've posted to the Snow Leopard forums. Please fix the discrepancy.

  • How to create email to Support Team when NEW message created in SupportDesk

    Hi there,
    I have been sitting with this for a while now, and am quite frustrated. I want to know whether it is possible to generate an email notification to the Support Team in the Service Desk whenever a new message is created by the user. So far, the Org Structure is correctly set up in PPOMA_CRM. The rule CRM_DNO_1 (13200137) is configured and works. Application CRM_ORDER with Action Profile SLFN0001_ADVANCED is configured, and by standard config works by correctly determining the responsible Support Team per SAP Component whenever a new message is created. Lastly, I have configured my own Action Definition that sends an email to the user (Reported By) to notify him whenever the Status of the message changes (like to In Process or Confirmed etc), which works.
    Now, whenever a new message is created by a user in the satelite system, it gets created in Service Desk and the Reported By, Sold-to-Party and Support Team are determined and the status of the message is NEW. When looking at the message in Service Desk under Actions, the only action assigned so far is  the "SLFN0001_ADVANCED_FIND_PARTNER - Find support team responsible, when message is created" action. Now, the issue is this: how do you assign an action to the message straight after the Support Team determination, but before any other processing takes place in the message (meaning, you have to click on Change in Service Desk to start processing the message - when doing this, additional actions are assigned). I have created my own Action Definition (copy of SLFN0001_ADVANCED_FIND_PARTNER) and added another Processing Type after the Method Call (CRM_DNO_PARTNER_1) to email a Smartform (Processing Type = Smart Forms Mail) to the Support Team. But from here things just dont work - either it skips the Support Team determination, or it doesn't process the SmartForm type at all. Even by creating a standalone Action Definition and using Partner Determination / Function SLFN0003 (Support Team - almost same like to notify the Reported By about status changes to the message), this newly-defined action doesn't even list under Actions in the message whenever a new message is created. Only after clicking on Change in the message does this action for the first time list and execute, which is pointless - you don't want someone to open the message first and change it to enable notification of the Support Team of a new message; this should happen as soon as the message gets created.
    So, if there is anyone out there who has done this before, please help, it would be much appreciated.

    Gavin,
    I managed to get this working in our system.
    This is what I did:
       - action ZSLFN0001_ADVANCED_FIND_PRTNR (copy of SLFN0001_ADVANCED_FIND_PARTNER): changed in processing type the method to ZCRM_DNO_PARTNER_1 which I created as described in note 1041455. The Sort Order of this action has the same number as the original action of SAP (nr. 10 in my case).
       - I created another action Z_MAIL_TO_SUPPORTTEAM_OPEN with Sort Order one higher than the previous (nr. 11 in my case).
    Processing Time: When saving document
    Processing Times not permitted: No Restrictions
    Sort Order: 11
    Schedule Automatically
    Partner-Dependent: SLNF0003
    Determination Technology: Using Conditions that can be Transported
    Rule Type: Workflow Conditions
    Action Merging: Max. 1 Action for Each Action Definition
    Processing Type
                  -  Form Name: ZFORM
                  -  Processing Class: CL_DOC_PROCESSING_CRM_ORDER
                  -  Processing Method: CRM_SRVORDER_EXEC_SMART_FORM
                  -  Archive Mode: Mail Only
    Then I configured a Schedule Condition for Z_MAIL_TO_SUPPORTTEAM_OPEN: &CRM Service Process.User Status& = E0001ZSMSD001.
    For me it's working like a ChaRM now
    Hope it also solves your problem!
    Best regards,
    Roel

  • How do i make a new file created appear in the Application Navigator?

    I am doing an extension to JDeveloper..How do i make the new file that the user has created to appear in the Application Navigator?
    What methods can i use?
    These are my codes...but it does not work still...
    File file = new File(dir ,fileName);
    file.createNewFile();
    FileWriter fw = new FileWriter(file, false );
    PrintWriter pw = new PrintWriter( fw, true );
    Workspace workspace = ctx.getWorkspace();
    java.net.URL projectURL = workspace.getActiveProjectURL();
    URL url = file.toURL();
    Node node = new Node(url);
    jpr.add(node, true);
    node.open();
    NavigatorManager.getWorkspaceNavigatorManager().openNavigator(ctx);
    ProjectNavigatorManager.getApplicationNavigatorManager().openNavigator(ctx);
    EditorManager.getEditorManager().openDefaultEditorInFrame(node.getURL());

    If it's an IMAP type account then you should get an Edit button at the top of the list of folders that you currently have on your email account. If it's a POP type account then you won't get the Edit button, and you are limited to your existing folders

  • How to trigger a Report when a file is placed in Application server

    Hi All,
    How to triggger a Report and get executed when a new file is placed in the application server.?
    It will be helpful if a Navigation is provided for the EVENT.
    Thanks in advance
    Chakri

    Hi,
    Check what is the frequency of the file coming to the application server.
    Schedule your program in SM36 giving data and time make it periodic . select the check box Periodic Job
    and then select the period values and give the period values as per the frequency of the file coming to app server.
    Thanks,
    Harini

  • Automator Script to rename files with the file's Comment text?

    Hello and thank you for your time!
    Summary:
    I'd like to have an Automator Script that would copy the File's Comment info and paste it to the File's name, so I can import my sound effects into iTunes and have the proper labeling.
    Breakdown:
    I have a ton of Sound Effects that I'd like to put into iTunes, but the filenames are for example, "04. Track 04.mp3".  Not the most helpful name.
    I can search by "car crash" in the finder and find THAT file ("04. Track...")  because it's in the File's metadata in the Comment info, as "Car Crash - Chevy Camaro".
    So is there a script or a way to script Automator to copy the File's Comment info and paste it to the File's name, so I can import these into iTunes and have the proper labeling?
    Thank you for reading!
    - Ben

    This should be much faster and direct....
    Source = "C:\temp" 
    Destination "C:\newTemp"
    Set objFSO = CreateObject("Scripting.FileSystemObject")     
    Set arrFiles = objFSO.GetFolder(Source).Files  
    For Each file In arrFiles  
        If InStr(LCase(file.name), ".zip.") > 0 Then 
            arrFilename = Split(lcase(file.name), ".zip.")  
            newname = arrFilename(0) & ".zip" 
            WScript.Echo file.name & " -> " & newname  
            objFSO.CopyFile file.path, Destination & "\" & newname
        End If 
    Next 

  • Script to delete files created on a specific date with sepecific name

    Hi,
    Is it possible to help me with a powershell script that delete files under a folder and subfolders that have the following attributes
    1. have the name (default.*) and (index.*)
    2. created on a specific date say 1-9-2014
    3. created between specific time say between 10:00 - 16:00
    Thanks in advance!

    break out the components of the script.
    IE does this match 
    Get-ChildItem -Recurse c:\temp\*.*or Get-ChildItem -Recurse c:\temp\*.* | Where-Object {$_.CreationTime -gt (get-date "01-09-2014 10:00AM") -and $_.
    CreationTime -lt (get-date "01-09-2014 14:00PM")}Get-ChildItem -Recurse c:\temp\*.* | Where-Object {$_.CreationTime -gt (get-date "01-09-2014 10:00AM") -and $_.
    CreationTime -lt (get-date "01-09-2014 14:00PM")} | Where-Object {$_.name -match "default"}Might not be working as it might not be matching.Once you get it matching the remove-item will work.
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • BEx Analyzer (7.x): currency change when new formula created

    Hi All,
    I have a strange one.  Query is executed in BEx analyzer.  A new formula is created outside the query results window using excel functionality, and the currency changes from USD to DM. 
    Example query results: 
    Cell A1: Var 1 = $150.00
    Cell B1: Var 2 = $160.00
    Cell C1: Var 3 = $70.00
    New formula created using excel functionality:  =sum(A1+B1) displays as 310.00 DM
    The language settings have been checked for the operating system and for SAP (user data) and they appear to be correct.  Is there another setting to be checked?
    Thanks,
    Pam

    sap said it was working as designed.  suggested we look at regional settings on laptop and make a workbook template with us settings.

Maybe you are looking for