Automator or Apple Script To Move Multiple Files to Multiple Folders

I was just wondering, is there any sort of automator workflow or maybe apple script that will allow me to automate the following:
I have a folder named SCANS containing multiple different files that need to go to multiple different folders.
So Say I have:
SCANS
and in this folder I have ten files named A,B,C,D,E,F,G,H,I,J and I want each of these files to be moved to different folders eg.
A I want to go to folder 1
B I want to go to folder 2
C I want to go to folder 3 etc etc.
Anyone know if there is a way of doing this please?
I have tried a workflow where I find finder items in the Scans folder and move to another but that only seems to work for one file.  When I add more it does not seem to work.
Any help/guidance would be appreciated.
Thank you!

Hi Niel,
Not quite what I wanted because I missed some information from my question....
What I actually want is to search for files containing certain text in the name and if positive to then move that file to the specified folders.
Cheers.

Similar Messages

  • Sql*loader map multiple files to multiple tables

    Can a single control file map multiple files to multiple different tables? If so, what does the syntax look like? I've tried variations of the following, but haven't hit the jackpot yet.
    Also, I understand that a direct load will automatically turn off most constraint checking. I'd like to turn this back on when I'm done loading all tables. How/when do I do that? I can find multiple references to 'REENABLE DISABLED CONSTRAINTS', but I don't know where to say that.
    TIA.
    LOAD DATA
    INFILE 'first.csv'
    TRUNCATE
    INTO TABLE first_table
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (a,b,c)
    INFILE 'second.csv'
    TRUNCATE
    INTO TABLE second_table
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (x,y,z,xx,yy,zz)
    etc.

    Here you go what you want..
    http://www.psoug.org/reference/sqlloader.html
    LOAD DATA
    INFILE 'c:\temp\demo09a.dat'
    INFILE 'c:\temp\demo09b.dat'
    APPEND
    INTO TABLE denver_prj
    WHEN projno = '101' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    INTO TABLE orlando_prj
    WHEN projno = '202' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    INTO TABLE misc_prj
    WHEN projno != '101' AND projno != '202' (
    projno position(1:3) CHAR,
    empno position(4:8) INTEGER EXTERNAL,
    projhrs position(9:10) INTEGER EXTERNAL)
    Thanks
    Aravindh

  • Un-'Locking' multiple files in multiple folders....

    So I just spent 2 hours at the 'Genius' bar manually 'unlocking' hundreds if not thousands of photos in my 'iPhoto' (05) library in order to upgrade to iPhoto '06... apparently, when I imported some pictures from Windows... it brought them in as 'locked' (i.e. when you 'get info...' on a file, and it has the 'Locked' check-box checked), well apparently, in order to upgrade to iPhoto '06, you have to 'unlock' every single file... given the way that iPhoto stores your files, if you've got a few locked, scattered throughout your library, it's going to take a LONG time to find them all and unlock them.
    My question for the Mac OS X specialists at large is, "Is there a way to un-lock multiple files in multiple directories and folders, WITHOUT doing it manually? I can't believe I actually sat at a genius bar and did this for TWO hours. According to my Genius, that was the only way to do it. Are there any other Genius' out there that may have a differing opinion? Keep in mind, he was one of 2 or 3 native english speakers (here in the very busy Shibuya, Tokyo store) any solutions would be appreciated, because it appears I've got multiple files in my MacBook iPhoto library that are 'locked' and I'd like to find an easier way to unlock them.
    FYI, we went to finder and searched for 'other' "Files Write Protected" etc., but we were never able to find ONLY files that are locked... is there a better way? Surely there has to be. Looking forward to learning something new.
    Hal W.
    Tokyo, Japan
    Mac Mini, MacBook 13.3"   Mac OS X (10.4.7)  

    There's also a Terminal command that will work:
    Launch Terminal from your utilities folder, and enter this command:
    find /Users/yourname/Pictures/"iPhoto Library"/ -flags uchg -exec chflags nouchg {} \;
    Be sure you get the "spaces" right, including the ones before and after the curly braces--{}--and there is no space between \; and it should work just fine. You may want to just copy and paste the above into a text program, fill in your short user name, then copy and paste into Terminal. And it must be all one line. After you've entered the command, hit the Return key to execute it. It will look in your iPhoto Library folders for all files that have the locked flag, then change the flag to unlocked.
    Francine
    Francine
    Schwieder

  • Loading data from multiple files to multiple tables

    How should I approach on creating SSIS package to load data from multiple files to multiple tables. Also, Files will have data which might overlap so I might have to create stored procedure for it. Ex. 1st day file -data from au.1 - aug 10 and 2nd day
    file might have data from aug.5 to aug 15.  So I might have to look for max and min date and truncate table with in that date range.

    thats ok. ForEachLoop would be able to iterate through the files. You can declare a variable inside loop to capture the filenames. Choose fully qualified as the option in loop
    Then inside loop
    1. Add execute sql task to delete overlapping data from the table. One question here is where will you get date from? Does it come inside filename?
    2. Add a data flow task with file source pointing to file .For this add a suitable connection manager (Excel/Flat file etc) and map the connection string property to filename variable using expressions
    3. Add a OLEDB Destination to point to table. You can use table or view from variable - fast load option and map to variable to make tablename dynamic and just set corresponding value for the variable to get correct tablename
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How do i find and move all files across multiple disks

    I just purchased a 2010 Mac Pro and wanted to set it up with a clean install of Mavericks.  I installed a new SSD as my boot disk and did a clean install of Mavericks on it.   All good so far.
    Now from my previous Macs I have several disks (internal and external) that have pictures, music and movies spread all over the place.
    I want to know how I can search all of the drives for all of a specific file type (i.e, JPEG or MP3) and then move those files to a new folder.  Once I have all of the files of a specific type in a single folder I can create a new library in iPhoto or iTunes using those files.
    I tried AraxisFDF and it worked well for finding the files but when it moves the files it saves then in their original file structure (i.e, volume/folder/folder/folder/file) which places the files in multiple folders again.
    Any ideas?
    Thanks.

    You can clone the respective HDDs using Disk Utility>Restore or Carbon Copy Cloner.  That will guarantee that you have all images and movies backed up.
    Ciao

  • Apple script to batch rename files by deleting tags on front and back of the file name

    Hi, I'm trying to rename a couple thousand files from their current format:  "01074_Something Of A Dreamer_Mary-Chapin Carpenter.lrc"
                                                                                                                           "01075_Where Did We Go Right_Lacy J. Dalton.lrc"
                                                                                                                           "01076_Everybody's Reaching Out_Crystal Gayle.lrc"
                                                                                                         To simply:  "Something Of A Dreamer.lrc"
                                                                                                                           "Where Did We Go Right.lrc"
                                                                                                                           "Everybody's Reaching Out.lrc"
    I just want to delete the number tag on the front and the artist name at the end for all of the files.  I imagine a Script to do this wouldn't be too hard to write, something along the lines of read file name after the first '_' character it reads until it reads a second '_' character and rename the file to the string it reads between those two underscores with .lrc at the end.
    Unfortunately I know nothing about Apple Script other than it seems like the thing I would need to automate this process based on my limited google searches.  If someone could help me out with some advice on how to go about making this script or obviously if you simply have and/or can quickly write a script to do this it would be greatly appreciated!

    Here:
    tell application "Finder"
    repeat with this_file in (get files of window 1)
    set the_name to name of this_file
    set temp_name to items ((offset of "_" in the_name) + 1) thru -1 of the_name as string
    set temp_name to (items 1 thru ((offset of "_" in temp_name) - 1) of temp_name as string) & items -4 thru -1 of the_name as string
    set name of this_file to temp_name
    end repeat
    end tell
    (123647)

  • VB Script to move a file with date in name

    I'm so stuck but I know Im close.  So its friday and I'm brain dead and I'm asking for some help please.
    I have FILES starting with dates
    140729HDF0.835
    140730HES0.835
    140731UHG0.835
    and I need to move the files that are dated in the file's 2 days back.
    Dim ObjFso
    Dim SourceLocation
    Dim DestinationLocation
    Dim FileName
    Set ObjFso = CreateObject("Scripting.FileSystemObject")
    dteYesterday = DateAdd("d", -1, Date)
    SourceLocation = "c:\835old"
    DestinationLocation = "c:\835new"
    FileName = (Year(dteYesterday), 2) & Right("0" & Month(dteYesterday), 2) & Right("0" & Day(dteYesterday), 2) & ".835"
    ObjFso.MoveFile SourceLocation & "\" & FileName, DestinationLocation & "\"
    It's something in my FileName= because if I simply change it to
    FileName = "*.835"
    its works.  Can anyone help please??

    This approximates what you need to do:
    Set fso = CreateObject("Scripting.FileSystemObject")
    strFileDate = Right(Year(Now-1),2) & Right("0" & Month(Now-1),2) & Right("0" & Day(Now-1),2)
    source = "c:\835old"
    destination = "c:\835new"
    folder = fso.GetFolder(source)
    For Each fi In folder.Files
    If Left(fi.Name,6) = strFileDate Then
    fso.MoveFile fi, destination
    End If
    Next
    ¯\_(ツ)_/¯

  • Copying multiple files to multiple locations

    I'll give you as much background detail as possible to help explain this one.
    We've made ourselves a little filemaker application, and at the moment I'm just working on creating a final disc image for it.
    I figure I'm going to create an Automator application script on the DVD-ROM that will copy the contents to the Application folder, which is easy enough.
    Here comes the tricky part.
    From time to time we'll be wanting to send out software updates. This software links multiple files into Filemaker from various folders.
    When we send out an updates disc, I want to have an Automator script that will copy all the files on the update disc to the same folder names stored on the computer's hard drive.
    ie, all files in folder A on the DVD will be copied to folder A on the hard drive.
    and all files in folder B on the DVD will be copied to folder B on the hard drive.
    etc etc
    I'm not even really sure on where to start to build this script. There's a good 50 odd folders to do this for.
    I'm also wondering whether I'll need to input the full pathname of the destination or not. This could be problematic if someone has renamed their Macintosh HD to something else. Is is possible to just get it to look for the Applications folder as the destination?
    hope thats clear enough. feel free to ask if you need more info.

    Hi.
    Have you considered the implementation of an installation package (.pkg), using the PackageMaker tool.
    Good Luck

  • Issues with multiple Files with multiple subdbs on a single environment.

    I'm having an issue with Berkeley DB 4.2 on 32-bit platforms, regarding multiple physical files with multiple subdatabases in a single database environment. Specifically, when I open a subdatabase for a physical file, Berkeley DB thinks that it is using the same subdatabase in a different physical file.
    I'm doing the following:
    1. Create and open a db enviornment.
    2. Move file1 to the common area.
    3. Open, get and close the subdatabases in file1.
    4. Move file2 to the common area.
    5. Open, get and close the subdatabases in file2.
    6. remove file2 from the common area
    7. Move file3 to the common area.
    8. Open a subdatabase from file3. About 1/2 the time, the fetches
    return data from file2, not from file3.
    It's possible that at some earlier time (i.e. before step 1 of this
    test case), file1, file2 and file3 were the same file. I noticed
    that there is something called env->fileid_reset, but that is not
    in 4.2.52.
    Any ideas?

    Looks like I've resolved the issue

  • How ATTACH multiple files from different folders in one ATTACH 'session'?

    Hi,
    In Mac Mail, I often have to attach 2 or 3 separate files, all from different folder locations on my hard drive.
    This requires clicking attach, selecting file 1 and clicking OK, which closes the Attach dialog.
    Then I have to do it again 2 times for each other file. oy.
    Is there a way to Highlight multiple files in different directories (ala Command-Select...which doesn't work) before selecting OK?
    OR
    I've found that I can DRAG a file from the Attach dialog into the email and the dialog will remain open, only the file is HIGHLIGHTED in the email and , hence, gets replaced by the next file I drag into the email (or select by the normal method)....
    Is there a way to drag that file#1 into the email and have it NOT remain highlighted, so that I can pick another file to add in addition to that one?
    Thanks!

    ShizzleFizzle wrote:
    Is there a way to Highlight multiple files in different directories (ala Command-Select...which doesn't work) before selecting OK?
    Have you tried dragging files from Finder windows into the mail message window?

  • I can't move music files to different folders in my itunes library

    First, I have not created files in my itunes library for a while, and I could swear it was a lot easier years ago! ALL that I want to do is add the new music I've purchased or recently added to a folder that already exists in the playlist.
    1) All my recently added songs have been purchased through my iphone, I'd like to move them to a folder.
    2) When I connect my phone to my computer, I see the tab to click on my phone. I do, and it opens the content of Music in my iphone.
    3) In this content, there are folders to the left listed, beginning with Music, Movies, Purchased, Recently Added, Recently Played, "My Name" Favorites, another specific folder I labeled to seperate music, and then another Purchased folder.
    4) I WANT TO MOVE or copy my newly purchased music file to these folders so when I play them on my phone, I can SIMPLY choose the file that is asscoiated with my Favorites or other choice.
    Why Is This So Difficult to do! Or is it that easy and I'm overlooking the past hour I've spent trying!
    Second part of my aggravation, why can i NOT sort the files in a music folder by song name anymore?! We used to be able to click at the top of the listing, Name, Aritist, Albulm etc. to sort them alphabetically and make a search easier depending on , but now I can no longer do this.

    This happened to me too but I only tried one song and then gave up. I thought it was a fairly popular song.

  • How to read multiple files at multiple locations using properties file

    hi all ,
    in my code i take configuration input from a properties file ,it was really easy but what if there are multiple files ? how can i take configuration input (file path etc) from properties file in that case ? any suggestion ?

    thanks :) ..i am doing like this :
    String fName[]=new String[10];
              String choice[]=new String[10];
              String Delim[]=new String[10];
              ResourceBundle a = ResourceBundle.getBundle("input");
              String n=a.getString("NOF");
              try
                   for(int i=0;i<Integer.parseInt(n);i++)
                        fName=a.getString("PATH"+(i+1));
                        choice[i]=a.getString("HEADER"+(i+1));
                        Delim[i]=a.getString("DELIMITER"+(i+1));
                        putData(fName[i],choice[i],Delim[i]);//to put data in database
              catch (NumberFormatException e)
                   System.out.println("Number of files are invalid");
    hope this method would be fine ....again thanks for the advice :) :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • For some reason, my compression option is grayed out under "File" menu, and when I select a folder with multiple files, or multiple documents, and try to right-click or tap the mousepad with two fingers, I do not get a "compress" option available. Help.

    I don't know why, but when I select a folder with multiple docs contained within it, or multiple files, the Compress option is grayed out under the File menu, nor is it available when I right-click. Please help.

    Yes it is, but I have the same problem of the option does not appear with "right click" (I'm actually control-clicking), and COMPRESS is grayed out under the file menu. I'd like to fix it.
    Hmm. After finding the Archive Utility,* I tried archiving the folder. It came out as .cpgz, ugh. Found there was a preference to make .zip the default. It worked!
    And now…the menus are not grayed out. ?!?! OK.'
    Hope this helps someone.
    *You cannot find this via search, apparently it is a hidden file, you have to click from the root drive through to /System/Library/CoreServices (Thanks for the file path Alberto!)

  • Batch Process multiple files in multiple folders

    I am using Acrobat 8.0.0 on Windows XP.
    Is there a way to create some type of macro to combine multiple PDFs within multiple folders? Or better yet, I'd like to combine the files into a PDF package with security.
    Thanks, let me know if I need to be more clear of provide more info.

    Thanks!
    From what I can tell Process Multiple Files allows input from three places:
    1. A folder. 2. Import (like a scanner?) 3. Open files.
    So it might be nice if it had a 4th option that would allow files to come out
    of Organizer via tags, albums, etc. And if that option was chosen then it
    would be nice to save the tags, and create version sets optionally.
    But my guess is that from a product design perspective the thinking is
    that most people would rather work in Organizer and then perform
    actions on a logical set of photos from there. Certainly, that would be my
    preference.
    What I'd like to do is do be in Organizer, select my images via tag(s),
    run QuickFix on them, (all of that I can do), then reduce the file size,
    and save the finished product as a version set. Then only thing I can't do
    in PSE7 is reduce the file size. Of if there is I don't know how to do
    it automatically.
    Well, thanks for the help!

  • Automator or Apple Script help needed

    Hello,
    I have been trying time and time again to create an automated task that runs every hour, in which it should
    1) Open Web Browser (Safari, Firefox, whichever one)
    2) Type in a URL or choose a bookmark.
    3) Log In to university account, I guess by typing my user and password
    4) Click a bunch of links
    5) Take a screenshot and number it picture_i+1 (where i is the number of the last screenshot taken)
    6) Exit Safari
    7) Mail me picture or keep it on desktop (whichever one doesn't make a difference)
    Now is this possible? Whenever I do it with automator watch me do ( Accessibility options are checked)
    It keeps messing up, it speeds up the process and messes up everything, I went as far as having a text file that has the user name and password, and automator copy's one by one and pastes it in.
    Let me know if anybody has any ideas I would really appreciate it!
    Thank you!

    *So this is what I came up with.... Works perfectly, thanks for your guy's advice....*
    *Now to figure out how to get it to run every hour.*
    CODE:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    tell application "Safari"
    open location "http://www.blackboard.XXX.edu"
    end tell
    tell application "System Events"
    if UI elements enabled then
    tell process "Safari"
    set frontmost to true
    end tell
    delay 9
    keystroke "u"
    delay 3
    keystroke "s"
    delay 3
    keystroke "e"
    delay 3
    keystroke "r"
    delay 3
    keystroke "n"
    delay 3
    keystroke "a"
    delay 3
    keystroke "m"
    delay 3
    keystroke "e"
    delay 3
    key down tab
    delay 3
    keystroke "p"
    delay 3
    keystroke "a"
    delay 3
    keystroke "s"
    delay 3
    keystroke "s"
    delay 3
    keystroke "w"
    delay 3
    keystroke "o"
    delay 3
    keystroke "r"
    delay 3
    keystroke "d"
    delay 3
    key down return
    else
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.universalaccess"
    display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
    end tell
    end if
    end tell
    tell application "Safari"
    activate
    tell application "System Events"
    tell application process "Safari"
    delay 5
    open location "https://www.blackboard.XXX.edu/webapps/blackboard/execute/launcher?>type=StudentCoursesView&id=XXXXXX&url="
    delay 5
    keystroke "p" using command down
    repeat until sheet 1 of window 1 exists
    end repeat
    click menu button "PDF" of sheet 1 of window 1
    delay 3
    click menu item "Save PDF to Web Receipts Folder" of menu 1 of menu button "PDF" of sheet 1 of window 1
    delay 5
    keystroke return
    delay 5
    end tell
    end tell
    end tell
    tell application "Safari"
    activate
    tell application "System Events"
    tell application process "Safari"
    delay 7
    open location "https://www.blackboard.XXX.edu/webapps/blackboard/execute/launcher?>type=StudentCoursesView&id=XXXXXX&url="
    delay 5
    keystroke "p" using command down
    repeat until sheet 1 of window 1 exists
    end repeat
    click menu button "PDF" of sheet 1 of window 1
    delay 3
    click menu item "Save PDF to Web Receipts Folder" of menu 1 of menu button "PDF" of sheet 1 of window 1
    delay 5
    keystroke return
    end tell
    end tell
    end tell
    tell application "Safari"
    activate
    close every window
    quit
    end tell
    </pre>

Maybe you are looking for