Change Tiger default Folder Action to parse all files in folder?

I'd like to be able to use Automator and OSX Tigers Folder Actions to parse all files in a folder to an automator workflow, but it seems the default is that Folder Actions just pass the newest file added to a folder. Is it possible to modify the default applescript that says something like open_added to open_all? Sorry, not an applescripter so don't shout at me. What I'm trying to do is get automator to construct a variable URL from various txt files in a folder. I'm using the txt files as variables as Tigers Automator doesn't seem to be able to use variables or save and combine a result.

That is the way that folder actions work. You can edit the AppleScript wrapper that Automator makes for your folder action, though, since the folder action handler also returns an alias to the attached folder.
If you look in your user's *~/Library/Scripts/Folder Action Scripts* folder, the folder action script for your workflow looks something like this:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on adding folder items to this_folder after receiving added_items
tell application "path:to:your:workflow.app"
open added_items
end tell
end adding folder items to
</pre>
By changing the line open added_items to open {this_folder}, the script will pass the folder instead of the files, so you can then use that in your workflow (e.g. *Get Folder Contents*, etc).

Similar Messages

  • How to change the default save encoding of the dvm files when create dvm???

    When I creating a DVM(domain-value mapping) in Chinese on the ESB control and confirm it, then restarted the SOA service, the DVM that I created in Chinese disappeared from ESB control. All the maps(both English and Chinese ) are in DVM Repository.
    After I updated the encoding from ‘UTF-8’ to ‘GB2312’ in the three files below, and restarted the SOA service, the DVM in Chinese appeared on ESB control.
    But when I adding the second row in Chinese and save it, then restart the SOA service, the DVM in Chinese disappeared from ESB Control once again. Because the encoding in the three files below is updated from ‘GB2312’ to ‘UTF-8’ .
    Files:
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm\Chinese.xml.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\content\files\dvm\Chinese.xml_1.0
    How to change the default save encoding of the dvm files when create dvm in ESB control ???

    I have the same problem.  When I updated to Mavericks now the bookmarks bar font is huge.  I liked it the way it was before.  I liked the smaller font.  Also wish I could change the color of the sidebar and font/folders too.
    I tried to see in preferences if there was anyway to change it, but I don't see anything there.

  • How to read list of all files in folder on application server?

    How to read list of all files in folder on application server?

    Hi,
    First get the files in application server using the following function module.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
          EXPORTING
            name     = loc_fdir
          TABLES
            file_tbl = int_filedir.
    Here loc_fdir contains the application server path.
    int_filedir contains all the file names in that particular path.
    Now loop at int_filedir.
    OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
    MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
    endif.
    close datset int_filedir-name.
    endloop.

  • Creating an action that treats all files in a directory

    How can I make an action which changes the picture size and resolution for all files in a directory and saves the new versions of the files in a subdirectory?
    Thanks

    Macro Details wrote:
    First create your Sub directory. Then start the Action. Open file, Resisize save as (to Sub directory) then close the file.
    Now: File- Automate-Batch. Select your action and your folders and overide the open Command and the Save As Command.
    Frankly Norbert I think the Image processor way is easier but to each his own as they say.  

  • How to make button to format a HardDrive or USB, How to remove all files from folder, and How to delete a process in listbox with a textbox?

    Hello!
    Here's the question with explaniation: How can i format the USB or Drive by clicking a button what's meant for it?
    and the second question what's also in vb.net: How can i remove all files from folder ? 
     Here's the Look of program: *
    Using the PC button, it will delete the free space of the PC, do you guys/girls know where it's location?

    Example Code:
    Imports System.Runtime.InteropServices
    Imports System.IO
    Public Class Form1
    Dim CBoxDrives As New ComboBox
    WithEvents FButton As New Button
    <DllImport("shell32.dll")> _
    Private Shared Function SHFormatDrive(ByVal hwnd As IntPtr, ByVal drive As UInteger, _
    ByVal fmtID As UInteger, ByVal options As UInteger) As ULong
    End Function
    Private Enum SHFormatFlags As Integer
    SHFMT_ID_DEFAULT = &HFFFF
    SHFMT_OPT_FULL = &H1
    SHFMT_OPT_SYSONLY = &H2
    SHFMT_ERROR = &HFFFFFFFF
    SHFMT_CANCEL = &HFFFFFFFE
    SHFMT_NOFORMAT = &HFFFFFFD
    SHFD_FORMAT_FULL = 0 ' full format
    SHFD_FORMAT_QUICK = 1 ' quick format
    End Enum
    Private Sub FButton_Click_1(sender As System.Object, e As System.EventArgs) Handles FButton.Click
    If CBoxDrives.Text = "" Then
    MsgBox("No Drive Selected")
    Exit Sub
    End If
    Dim Iresult As ULong = SHFormatDrive(CType(Me.Handle.ToInt32, IntPtr), CUInt(Asc(CBoxDrives.Text.Substring(0, 1)) - Asc("A")), CUInt(SHFormatFlags.SHFMT_ID_DEFAULT), 1)
    End Sub
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Me.Size = New Size(200, 100)
    With FButton
    .Size = New Size(50, 25)
    .Location = New Point(5, 5)
    .Text = "Format"
    End With
    Me.Controls.Add(FButton)
    With CBoxDrives
    .Size = New Size(50, 25)
    .Location = New Point(75, 5)
    .DropDownStyle = ComboBoxStyle.DropDown
    End With
    Me.Controls.Add(CBoxDrives)
    Dim DrivesFound As Integer = 0
    Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
    Dim d As DriveInfo
    For Each d In allDrives
    If ((d.DriveType = DriveType.Fixed) Or (d.DriveType = DriveType.Removable)) AndAlso Environment.GetEnvironmentVariable("SYSTEMROOT").StartsWith(d.Name) = False Then
    CBoxDrives.Items.Add(d.Name)
    DrivesFound += 1
    End If
    Next
    CBoxDrives.SelectedIndex = DrivesFound - 1
    End Sub
    End Class

  • How to change the default location of 'Music', 'Pictures' in my home folder

    IMAGINE I have 2 hard disk partitions on the SAME hard disk,
    one is called 'Macintosh HD' and the other is called 'My Data'.
    The Plan:
    In the 'Macintosh HD', there are (1) system files & (2) users' settings.
    In the 'My Data', there are all the music, pictures, etc.
    For example, the 'Macintosh HD' has 40GB and the 'My Data' has 120GB.
    All I want to do is to *separate the SYSTEM and my DATA* _without migrating my home folder_ inside 'Macintosh HD' which contains folders called 'Music', 'Pictures'... to the partition 'My Data'.
    _+*I want to separate the system files and my data incase I need to reinstall the Mac OS X while leaving all my data untouched.*+_
    So the way I should do (I guess) is to leave my home folder inside 'Macintosh HD' empty,
    and create files called, for example, 'My Music', 'My Pictures', etc. in the 'My Data' partition.
    Then _redirect the files 'Music', 'Pictures', etc. in my home folder inside 'Macintosh HD'_ to _'My Music', 'My Pictures', etc. in the 'My Data' partition_.
    In Windows XP or Windows 7, you can redirect those as using the methods below:
    (1) http://i41.tinypic.com/2rorkhx.jpg
    (2) http://www.sevenforums.com/tutorials/18629-user-folders-change-default-location. html
    But I just don't know how to do that in Mac OS X, it seems that Mac OS X doesn't even provide a way for users to do so:
    http://forums.macrumors.com/showthread.php?t=336192
    I saw a reply in macrumors forum and tried to move the 'Music', 'Pictures', etc. folders,
    but it turned out that those files were being copied, not moved.
    So I can't move the 'Music', 'Pictures', etc. to the partition 'My Data' and make aliases of them which can be put in my home folder inside 'Macintosh HD'.
    So, are there only 3 options for me too choose?
    (1) stop trying to fight Apple and Mac OS X on where it puts things, just put all the things in my home folder inside 'Macintosh HD', using only 1 partition
    (2) move my home folder to the other disk partition, in this case, the partition 'My Data'
    (3) can't redirect the location of Music', 'Pictures', etc. folders in my home folder in the 'Macintosh HD', but just simply put things in the 'My Data'.
    Thanks in advance!
    Message was edited by: MicBook

    Here's the easy solution:
    1. Copy the folders you want on the My Data partition.
    2. Verify all files copied OK, then delete the same folders on Macintosh HD.
    3. Make an alias for each of the folders you have moved.
    4. Copy the aliases to your Macintosh HD/Users/Home folder.
    5. Delete the space and "alias" from each of the aliases so the have the exact same names as the originals.
    DO NOT do this with the /Home/Library/ folder as the above will not work with that folder.
    When you attempt to delete the folders you have moved the OS will complain that it cannot delete them because they are needed by OS X. This is normal. In order to delete the original folders and rename the aliases you will need to boot the computer from another drive or from the OS X installer disc. But for the latter you will need to run the Terminal (from the installer's Utilities menu) and use Unix commands to delete the folders and rename the aliases. If you know how to use the Terminal then the entire operation can be done from the command line. See the following:
    1. Boot the computer into single-user mode.
    2. At the prompt enter:
    /sbin/mount -uw /
    cd /Users/yourusername
    mv /Documents "/Volumes/My Data/rest of path/Documents"
    Repeat the above line replacing "Documents" with the names of the other folders you are moving. The "mv" command actually moves the folders rather than copying them.
    ln -s "/Volumes/My Data/rest of path/Documents" /Users/Documents
    Repeat this line for the other folders replacing "Documents" with the names of the other folders.
    You may find printing out the command line routine using a large mono-spaced font useful in assuring you spot the spaces in each command line. Note that the quotes used in the command lines above are required.
    Enter "reboot" without quotes to restart the computer.
    Message was edited by: Kappy

  • Powershell Script to change the default user Account picture for all users in windows 7 and 8

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev
    The default user account picture is stored here.
    C:\programdata\Microsoft\User Account Pictures\user.bmp
    It should just be a matter have copying the picture you want to that location and over writing what is there.
    or....
    Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users
    You can also configure this by a registry setting;
     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
      UseDefaultTile = 1
    The picture that you configure, will not be loaded until the user account will actually be created on the pc. Meaning the first time a >new< user will log on to a pc, they will have no picture shown at all using their login screen (this is default
    behavior). Same will occur if you enable the policy don't display last user name. However, once they log in the picture will be shown in the start menu, and if they lock their pc the image will also be shown

  • PSE9 Organizer - How to see all files in Folder view?

    In v8, there is a tab under Edit/Preferences named "Folder Location View" that allowed one to select either to see all files or just those in the folder that is selected.  I can't find this option in PSE9.  Anyone know what happened to it?
    PSE0 defaults to seeing only those files in the selected folder, which is normally my preference as well, except when I am doing certain things and then I really need to see all files in all folders.
    For example, I need/want to write my tags to the file meta data in all of my files, but I have to go to each folder individually to do this and then I can only do it on that individual folder.  I really would like to be able to select all of my files and fire it off (yes, I know that would take forever, but I could go do something else while it is processing.)
    This is the second reason that upgrading to PSE9 is really downgrading.  One shouldn't lose functionality that has existed in several (all?) previous versions!
    Hopefully, this setting has just moved and I can't find it.  If not, Adobe, please add it back in ASAP!!
    Thanks,
    ...Rich

    Oh, I forgot to comment on the ability to create an album instantly by folder name.
    That really seems like a pretty useless "feature" for all but the most challenged user.
    All you need to do without the feature is select all photos in a folder (ctrl a) and then drag them to the folder name.  That just doesn't seem to be all that difficult.
    Thanks again.
    ...Rich

  • How do you change the default Save As location for PDF files?

    I have not been able to find a straight answer anywhere.  I am scanning documents to my email then I need to save them.  Instead of saving them to the last folder I saved a file in, (which would be logical) it saves them in a temporary files folder EVERY time.  I have seen answers about how to change the folder when saving documents from a web browser but that is not what I am doing.  Someone please help!  I have thousands of files to save and this is incredibly frustrating. Agh!!!

    Is it your scanning software that does that, or Adobe Reader?
    Anyway, I don't know how to change the default change destination for either of it.
    I have had a similar problem with an entirely different software, so what I did is create a shortcut to the destination folder in my Temp folder, so a simple double-click when saving gets met quickly to that target folder.

  • All files in folder of Application server.

    Hi Frnds,
    how to get the all files from a folder of application server. I have to get the all files in internal table when i selecting only folder?
    thanks in advance.
    regards,
    Balu

    Here is an example program, which acts like an application server file browser.
    report zrich_0001 .
    data: begin of itab occurs 0,
          rec(1000) type c,
          end of itab.
    data: wa(1000) type c.
    data: p_file type localfile.
    data: ifile type table of  salfldir with header line.
    parameters: p_path type salfile-longname
                        default '/usr/sap/TST/DVEBMGS01/data/'.
    call function 'RZL_READ_DIR_LOCAL'
         exporting
              name           = p_path
         tables
              file_tbl       = ifile
         exceptions
              argument_error = 1
              not_found      = 2
              others         = 3.
    loop at ifile.
      format hotspot on.
      write:/ ifile-name.
      hide ifile-name.
      format hotspot off.
    endloop.
    at line-selection.
      concatenate p_path ifile-name into p_file.
      clear itab.  refresh itab.
      open dataset p_file for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset p_file into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset p_file.
      loop at itab.
        write:/ itab.
      endloop.
    Regards,
    Rich Heilman

  • Cannot change the default program to open a specific file type.

    Whenever I attempt to change the default program to open a file, it automatically reverts to whatever was selected previously.
    I work with a lot of .ai files and my default Illustrator version is set to Creative Cloud. CC crashes constatnly on my machine, however CS6 runs smooth as silk. I'd like to be able to double click an .ai file and have it open in CS6, not CC. When I right click > Get Info > Open with and change it, it reverts as soon as I click "Change all..."
    This isn't a huge deal... only takes a few seconds out of my day but it isn't something I should have to worry about.
    Any suggestions?
    Thanks in advance.

    I just successfully changed on my .docx to open into Pages. I went the same route that you mentioned... Right click---> Get Info---> Open With and changed it to Pages. When I clicked Change All, a dialog came up asking me if I am sure that I want to change all of my .docx to open in Pages. I click accept and tested it. Now my .docx open in Pages.
    So my question is, is your issue just applying to .ai files? Or is affecting other files, such as .docx? If it's just affecting .ai files, then there maybe an underlying reason for that. And it may not be able to be changed.
    Just a thought.
    KOT

  • Power shell script to list all files and folder permissions recursively

    Hi All,
    I am looking for a powershell script to perform the following operations.
    1) To list the folder and file permissions(Allow,Deny both) recursively in a given folder.
    2) List out all the files and folders which are having the deny permission or having only the read access (or) only the write access. Basically the folder should have Read,Execute,Write permissions. Else we have to flag that file/folder name.
    I had written a batch script for the same which does this task using icacls.exe output, but this script takes lot of time to recursively parse all the files ( ~1 lakh files).
    Please help me with the powershell script for the same.
    Thanks
    Sambasiva

    Try this module: http://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83
    After importing the module, you can run something like this:
    dir c:\folder -recurse | Get-AccessControlEntry
    That output can be exported to a CSV for later viewing. You can also provide some parameters to Get-AccessControlEntry to limit the results:
    dir c:\folder -recurse | Get-AccessControlEntry -FileRights Write
    dir c:\folder -recurse | Get-AccessControlEntry -AceType AccessDenied
    dir c:\folder -recurse | Get-AccessControlEntry -AceType AccessAllowed -FileRights Write

  • Folder action - rename & colorize new files

    Hello,
    to help myself handling / managing my incoming aka download folder i am trying / willing to write a script which does some automated tasks for me.
    a) unquarantine (solved)
    b) rename - add date/time(yyyymmdd) in front of the filename (open)
    c) label them with colors (open)
    *General question:*
    Well right now i am wondering about some general points first:
    Is it better to split that into 3 sep. folder actions scripts which would be attached to the same folder ... .no idea if that may result in problems regarding which script goes first.... or should i add it to a single script ?
    *Regarding a)*
    i found this post here:
    http://henrik.nyh.se/2007/10/lift-the-leopard-download-quarantine
    on adding folder items to thisFolder after receiving addedItems
    repeat with anItem in addedItems
    set anItem's contents to (quoted form of POSIX path of (anItem as alias))
    end repeat
    set AppleScript's text item delimiters to " "
    do shell script "xattr -d com.apple.quarantine " & (addedItems as text)
    end adding folder items to
    which explains an unquarantine routine ... works pretty good. I have just added a growl routine at the end for my personal use
    *Regarding b)*
    I'm not really sure how to handle the date_idea in applescript. I know i could use "do shell script" and save the output of date to a variable but i hope there are better methods to get the name in my desired format (yyyymmdd)
    And how would you realize the rename-action itself in applscript ?
    *Regarding c)*
    I guess "set label index of myFile to 1" is the correct comd here for Finder. Or would you suggest any other method ?
    any help is appreciated
    best regards
    fidel

    Is it better to split that into 3 sep. folder actions scripts which would be attached to the same folder ... .no idea if that may result in problems regarding which script goes first.... or should i add it to a single script ?
    A single script, for sure.
    If you have three separate scripts you will encounter a race condition were all three scripts are trying to run at once. This is asking for trouble, especially when one of the scripts renames the file making it impossible for the others to find it (e.g. they start off looking for 'download.doc' but by the time they do their thing that file has been renamed and no longer exists).
    i found this post here:
    (snip)
    That code, as written is fatally flawed. I can't believe it works.
    First of all it starts off by looping through the addedItems, which is fair enough, but it doesn't do anything worthwhile within the loop - It just converts anItem to a POSIX path, but doesn't do anything with the result. It goes on to set the text item delimiters, but doesn't restore them later.
    Finally it calls do shell script, but not in a way that will work. You cannot pass addedItems as-is because it is not in a format that will work in the shell.
    I'm not really sure how to handle the date_idea in applescript. I know i could use "do shell script" and save the output of date to a variable but i hope there are better methods to get the name in my desired format (yyyymmdd)
    Ironically I would go for a shell-based approach to get the date, mainly because simple date formatting like this is far easier in the shell than in AppleScript (it can be done in AS, but takes multiple lines of code).
    I guess "set label index of myFile to 1" is the correct comd here for Finder. Or would you suggest any other method ?
    set label index is the way to go, for sure.
    So putting the above together you'll end up with something like:
    on adding folder items to thisFolder after receiving addedItems
      set theDate to do shell script "date +%Y%m%d"
      repeat with anItem in addedItems
        do shell script "xattr -d com.apple.quarantine " & (quoted form of POSIX path of (anItem as alias))
        tell application "Finder"
          set label index of anItem to 1
          set name of anItem to (theDate & (name of anItem as text))
        end tell
      end repeat
    end adding folder items to

  • When I try to change the default program for opening a specific file type The "Always use the selected program to open this type of file" does not highlight.

    I can not therefore change the default program. How can I get this to highlight?

    Hi Swansong,
    It is also possible to [[Set how Firefox handles different types of files]]

  • JDeveloper settings - change the default code editor view for JSPx  files

    Hi, when you open a .JSPX or JSP page the editor opens in 'design' mode. Is there a way to change this default behavior and open in 'source' mode? I write the JSF/JSP pages editing code and every time I open a new page I have to wait till the IDE opens in view mode and then manually switch to source mode by hand.
    Thanks
    Jordi

    A year and a half after this post, and I still have this same issue as well. Even 10.1.3.3 has it.
    Thanks for posting the solution as this will now save me lots of time waiting and often re-starting JDeveloper.

Maybe you are looking for