I was wondering if it was possible to use Automator to move files based on the filename.

Hi,
I'm kind of new to Automator and I'm trying to come up with a sequence that will severely save me a few hours a day moving files from two larger folders into smaller folders. Basically the setup is that I have two folders, one constantly being populated with images and the other with video files. They each have file names starting with a two digit number (i.e. 12, 11, 10...) or "BG" and then a two digit number (i.e. BG12, BG11, BG10...) with the digits corresponding to a year. Essentially, I'd need to move the files into folders corresponding to the year (i.e. files starting with BG12 and 12 would be moved to 2012, files starting with BG11 and 11 would be moved to 2011, etc). As it stands now, I've only been able to get the 2012 folder populated. Any help would be greatly appreciated. Thanks.

Hi,
Here's a solution that uses a script, because it is not possible, at least to make twenty or more Workflows
In Automator :
Create a new worflow.
Add the action "Run Shell Script", select "/bin/bash" in the popup menu
Cut the text in the action.
Copy/paste this script in the action :
targetsDir=('/Users/jack/Desktop/MyImagesFolder' '/Users/jack/Desktop/MyVideosFolder')
destDir=('/Users/jack/Desktop/yearImageFolder' '/Users/jack/Desktop/yearVideoFolder')
for i in 0 1;do
      subfolder="${destDir[$i]}"/20
      for each in "${targetsDir[$i]}"/*;do
            if [ ! -d "$each" ];then ## not a directory
                  name=${each##*/};
                  if [[ $name =~ ^([0-9]{2})|^..([0-9]{2}) ]]; then
                        [[ $name =~ ([0-9]{2}) ]] && year=${BASH_REMATCH[1]};
                        /bin/mv -n "$each" "$subfolder$year"
                  fi
            fi
      done
done
Replace the paths in the first line by the path of your Images Folder  and Video Folder, use drag/drop between the simple quote ''
Replace the paths in the second line by the path of your destibation Folders, use drag/drop between the simple quote ''.
This script will not overwrite existing files, If you want to replace the existing file, use the /bin/mv -f instead of /bin/mv -n
That's it.

Similar Messages

  • HT1399 Why cant I create a playlist for my music/song videos? Continuous play is also not possible in the video app on the phone!!!! previously, prior to IOS 6, it was possible to have both music videos & songs mixed in the same playlist in the music app

    Why cant I create a playlist for my music/song videos? Continuous play is also not possible in the video app on the phone!!!! previously, prior to IOS 6, it was possible to have both music videos & songs mixed in the same playlist in the music app

    I am back with an update. I turned off Match on both the ipad and the iphone 5. By doing so I was able to sync my Iphone and ipad to itunes and store the music on my devices rather than the slow streaming.  So far this has fixed my problems with the iphone I have all my music, playlist, most of the album art and so on.  But the ipad is a different story.  I have the music and artist but not one playlist  I am sure Apple will have an upgrade soon that will address these issues they are usually very good about this. 
    Now have any of you experienced another problem that has existed as long as I have used faces in Aperture.
    I have over 200 faces and they are organized a-z problem is I have this going on A-Z folowed by a few that start over A-Z followed by another few A-Z and again a 4th time A-Z.  Imagine how difficult it is while I am showing someone the great features of my iphone, ipad and imac.  Which I do talk highly of all the time.  But how do I explain that even though their name starts with a or b or what ever they are not important enough to me to be in the first list of A-Z or even the 2nd or 3rd list of A-Z someohow they are in the 4th section of the list!!!!
    I have managed to get the Imac to fix this but for some reason the IOS devices do not.   Any ideas?
    Thanks Al

  • I would like to Know if it was possible to use

    I would like to know if it was possible to use the same AirPlay network when you have two soundlink air of Bose, the same music at the same Time for both

    You can stream to multiple rooms
    http://www.bose.com/controller?url=/shop_online/digital_music_systems/speakers_f or_airplay/soundlink_air/index.jsp

  • Is it possible to use Adobe Illustrator in multiple computers with the same account?

    Hi guys,
    So our company is a small designing tile company,
    we wanted to purchase the Adobe Illustrator and was wondering if it was possible to use it in multiple computers with one account, as we have two computers that are frequently use for designing, or do we have to buy two separated Adobes Illustrators for each computer?
    Thanks

    From the End User License Agreement (EULA):
    2.1.3 Portable or Home Computer Use. Subject to the restrictions set forth in Section 2.1.4, the primary user of the Computer on which the Software is installed under Section 2.1 (“Primary User”) may install a second copy of the Software for his or her exclusive use on either a portable Computer or a Computer located at his or her home, provided that the Software on the portable or home Computer is not used at the same time as the Software on the primary Computer.
    So, while it CAN be installed on more than one computer, they may not both be in use at the same time.
    --OB

  • It is no longer possible to use ALT + N and ALT + P from the "get info" window.

    On a PC, previously, when in the "get info" windows, it was possible to use ALT + N and ALT + P to switch to the song information for the next and previous song.  Since the update to the newest iTunes, it's no longer possible.  Has anybody found a keyboard shortcut that works?  The "keyboard shortcut" thing in iTunes says you can still use ALT + N, but it doesn't seem to be working for me.  Is it working for anybody else?

    You're welcome.
    tt2

  • Is it possible to use List Type in XML schema within the SOA Rule author?

    Is it possible to use List Type in XML schema within the SOA Suite Rule author? The reason is that with the following XSD, Rule author generates XML facts of type "List" for the element "ResultSet". Basically I want to check the Input facts (Input1, Input2, Input3) for some conditions and then assign action to the element Resultset of type List (array). The output Resultset can contain multiple values based on the input facts. My problem is that I am unable to see the ResultSet in the "Assign" action type of the action block. Is it possible to use the Resultset of type List with the Rule author or is there any limitation on the rule author and any workaround for this?
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/ns/TestMultipleOutputs"
    elementFormDefault="qualified">
    <element name="TestMultipleOutputs">
    <complexType>
    <sequence minOccurs="0">
    <element name="Input1" type="string" minOccurs="0"/>
    <element name="Input2" type="string" minOccurs="0"/>
    <element name="Input3" type="string" minOccurs="0"/>
    <element name="ResultSet" type="string" minOccurs="0"
    maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    --Thanks a lot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Richard,
    I have slightly modified the xml schema you suggested and was able to import into the rule author. the following is the modified XSD. Rule Author created a List type for the "ResultSet" . I still don't see "Resultset" in the assign action, so I tried creating RL function in order to assign the output to the "Resultset", but was unsuccessful so far. can you please let me know how to populate the resultset with the output values? Thanks a lot.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema attributeFormDefault="unqualified"
    xmlns:ns1="http://www.oracle.com/ns/TestComplexOutputs"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/ns/TestComplexOutputs"
    xmlns:tns="http://www.oracle.com/ns/TestComplexOutputs"
    elementFormDefault="qualified">
    <xsd:element name="TestComplexOutputs">
    <xsd:complexType>
    <xsd:sequence minOccurs="0">
    <xsd:element name="Input1" type="xsd:string" minOccurs="0"/>
    <xsd:element name="Input2" type="xsd:string" minOccurs="0"/>
    <xsd:element name="Input3" type="xsd:string" minOccurs="0"/>
    <xsd:element name="ResultSet" type="tns:ResultSetType" minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="ResultSetType">
    <xsd:sequence>
    <xsd:element name="ResultSet" type="tns:ResultSetStructure" minOccurs="1"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ResultSetStructure">
    <xsd:sequence>
    <xsd:element name="ErrorReason">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

  • TS2972 is it possible to use home sharing between two users on the same computer?

    My wife and I have itunes accounts and want to be able to share music we have each bought on our accounts. We have tried setting up the home sharing on our PC but it doesn't show up on the screen. Can anyone please help?

    "Is it possible to use home sharing between two users on the same computer?"
    No. Home sharing is used to connect two running instances of iTunes across a network. When you switch users on the computer all applications running on the other profile are suspended.
    You can however share your respective media folders so that they are visible in either profile and then copy over any content that you want, or you could create a single joint library which you use when either user is logged in.
    tt2

  • Is it possible to use a CompactDAQ and NI-DAQmx in the TPC-2212 with Windows 7 Embedded System?

    Hi,
    I would like to develop a application with the TPC-2212 (Touch panel computer)  and a CompactDaq System (NI9237 - 4-Channel, ±25 mV/V, 24-Bit Simultaneous Bridge Module).
    Is it possible or I should use a panel pc?
    Thanks.
    Solved!
    Go to Solution.

    This thread is a bit old, but I thought it would be worth while responding (as I was wondering the same thing a day ago).
    The answer to the OP's concern(s) is YES, you can install DAQmx on your Windows 7 embedded TPC-2212 touch panel device while connecting to your cDAQ hardware.  YES, it will function (depending on your memory constraints).  DAQmx BASE is NOT a requirement (which, to me, seems very ambiguous if you're referring to NI's documentation for the LabVIEW Touch Panel Module).
    My confusion began when it seemed using the Touch Panel Module for the 2212 was a requirement, not an option.  If one proceeds with this assumption, then referring to the TPM documentation:
    http://www.ni.com/pdf/manuals/371940d.pdf
    NOTE: this link above is to an older version, but the content itself (also installed locally with the TPM in \\manuals\TPC_Getting_Started.pdf) remains relatively unchanged.
    Section "Installing Additional Tools" clearly states "You must install additional tools on the target depending on the functionality you need."  Immediately following is the installation procedures for DAQmx Base.  You'll see the same statement in the LabVIEW help files that get installed with the TPM on your development machine.  Nowhere does it state, for Windows Embedded, that it's possible to use DAQmx itself.
    Because DAQmx is a bit of a heavy weight, you'll probably want to go with the Runtime (with MAX) as I did:
    Search for 'NI DAQmx Run-Time Engine - Configuration with MAX'.  I would have posted a link, but NI's site was down for maintenance at the time of this post.
    Connect to your 2212 over a network connection (I just used a cross over cable and connected directly).  Create a shared directory and copy the downloaded installer on over - install.  You could, of course, download direct if your 2212 is already networked with web access.
    I have my test station application running beautifully with an attached (USB) cDAQ chassis loaded with a variety of modules.
    I hope this post is as useful for somebody else as it would have been for me. 
    -Chris
    Kod Integrations, LLC
    Sr Software and Automation Engineer
    Certified LabVIEW Architect
    Kod Integrations, LLC
    http://www.kodintegrations.com

  • Possible to use both PowerPC and Intel-based systems together with Qmaster?

    Hello,
    New to the Qmaster setup, I was wondering if it was possible to set up a Qmaster cluster mixing PowerPC and Intel-based systems. If it is possible, what version of Qmaster would support this type of cluster?

    While it can work, note that if there is huge difference is processing speed, the PPC machine can actually slow down the process as everything waits for it to finish it's instance and copy it back.
    It's worth a try but keep an eye on how the various computers perform.
    Have fun.
    x

  • Possible to use MIGRATION to move Final Cut Pro to external HD w/OS ?

    MBP=Tiger and working FCP Studio.
    Just wondering if it would be possible to use migration assistant or some other third party application (since it is the same computer) to my bootable Leopard external HD in order for me to see how well it works without re-installing all the programs again.
    Thanks.
    PS. How many machines can you install it on and is there a sheet that shows the difference between FCP Studio and Express? Does express come with all the programs and demos?
    Next purchase after the HD 120hz refresh TV (Lord willing) is a Mac Pro - just read that there is software out there to make a stock 2.8 run faster than the 3.2, not sure I would do.
    Thanks again.

    Well it looks like it will work and it won't.
    Apparently, you have to SELECT all applications which then by default, selects your library and I don't have enough room.
    Was hoping that I could just choose ONE application, FCP and get used to it in Leopard. I don't suppose there is a 3rd party product that will allow me to do this. Why doesn't  allow us to manually select WHICH application(s) we want to move.
    Surely there has to be another way instead of installing all of the DVD's again. This is a nightmare.
    Appreciate any ideas. Otherwise its install all the DVD's, or CLONE OS to a NEW HD and start from there - glad I did as I have two clones of Leopard ,one 10.5.3, the other 10.5.2 and I tested 10.5.4 and yikes, it had major GU problems with redraw and lost some points overall in XBENCH.
    Am sure they can fix that easy - should be mostly for windows users and imobileme (LOL).
    Any help in transferring FCP to external appreciated via 3rd party program or individual application select.

  • Is it possible to use both inputs of my AudioBox at the same time?

    I was having issues last night, and I wanted to poll the community before I declared my device deffective.
    I have an AudioBox- USB and managed to hook it up to GB.  I tried both guitar and a microphone in Input 1 and they both worked.  I decided to try to have them both hooked up at the same time using both inputs, but I could not get GB to recognize anything from input 2.
    As a trouble shooting measure, I disconnected everything from input 1 and tried using input 2 on its own: still nothing.
    Questions:
    - Is there something I need to do in GB for it to recognize audio for input 2?
    - Maybe GB cannot do this, and I need to use Logic/Mainstage (have not tried this yet)
    - If GB can do this (and should have done so automagically), is my device possibly deffective?

    RLBL wrote:
    I could not get GB to recognize anything from input 2.
    [...] (and should have done so automagically)
    you have to set which channel you want each track to use:
    http://www.bulletsandbones.com/GB/GBFAQ.html#multitrackrecordinggbv10
    This FAQ entry offers a Minute GarageBand video tutorial
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Is it possible to use Arch like a source-based distro?

    I installed Gentoo on a spare box recently, and rather liked the idea of a source-based distribution. It's nice to think that the natively compiled code is optimized for my processor, even though even many Gentooists admit that the practical performance gains are minimal. However, Gentoo is less KISS-oriented and less bleeding edge than Arch, and I love Arch too much to switch anyway. I was wondering if one could recompile an entire Arch system using processor-specific optimizations like Gentoo, and maybe even have some equivalent of Gentoo USE flags? I can't manually recompile every package, and then do it again every time there's an upgrade - that would be too tedious. So, is there some automated method - to essentially use Arch like a source-based distribution? Can ABS help, or maybe a community-contributed tool? And finally, for a source-based and yet Arch-like distribution, what do you guys think of CRUX? Given that their documentation and community is much smaller than ours, is it very bothersome to install and maintain a desktop system using CRUX?

    Xyne wrote:
    Rebuild everything from source:
    bauerbill --build-all -S $(pacman -Qq)
    Build all available upgrade from source, including dependencies:
    bauerbill --build-all -Syu
    Install new package by building from source, including dependencies:
    bauerbill --build-all -S <pkgname>
    Bauerbill also provides an "AutoPatch" option that enables you automatically apply patches to PKGBUILDs and install files when building from source so you only have to edit a PKGBUILD once.
    *edit*
    Of course, you could simply enable "BuildAll" in the configuration file and skip the flag.
    @Xyne
    So bauerbill will build all the deps for packages from source too [dependency resolution] and build from source packages from groups [ex. xorg, gnome, kde, xfce4, etc]?? I'm having a hell of a time with pacbuilder as it's not as functional as I had hoped, so I am thinking of using bauerbill, if it does what I need or is actually functional as pacbuilder but more functional [deps, patching, etc] then i'll use it exclusively! Thanks for any help.
    Last edited by Chaniyth (2010-08-19 02:49:14)

  • Is it possible to use FaceTime With my two IPad With the same email address? I Will Google to china next month And i would like to communicate With my kids.

    IS it possible to use FaceTime With my two IPad That has the same address? I Will Go to China soon And i would like to discuss With my kids from there i.e. One IPad in China And one in Montréal.

    No, this is not possible.  It would be like dialing your own phone number.  You must verify an additional new email address for your second iPad.  See the following link which will tell you how to do this.  You will need to add this new address to Facetime app in one of your iPads.
    http://support.apple.com/kb/HE68

  • Possible to use menuBar with task flow based ADF menus?

    Hello -
    I've just worked through the " [Create ADF Menus for Page Navigation|http://www.oracle.com/technology/products/jdev/11/cuecards111/adf_set_43/ccset43_ALL.html] " tutorial. It shows how to create menus based on your task flows.
    My question: is it possible to use the af:menuBar with these menu models (instead of navigationPanes or breadcrumbs) ?
    I am using JDev 11g 11.1.1.1.0
    Thanks.
    Edited by: scott.turnquist on Nov 5, 2009 12:07 PM

    Hi,
    The XML menu model extends the Trinidad TreeModel, which extends Collection model. This allows you to access the hierarchical menu structure so that you can use af:iterator to build a structure to display in a af:menuBar
    Frank

  • Is it possible to use Archive Redo log file

    Hi friends,
    My database is runing in archive log mode.I had taken cold backup on Sunday but i am taking archive log file daily evening.
    Wednesday my database crash that means i lost all control file,redo log file,datafile etc.
    I have archived log file backup till Tuesday Night and other files like control file,datafile etc of Sunday .
    1)Is it possible to recover database till tuesday if yes HOW to use archive log file.
    (See SCN no of control file and datafiles is same ,if we use RECOVER DATABASE command oracle shows that media recovery is not requide.)
    we don't have current control file we had lost in media crash.
    null

    Dear friend
    In this scenario
    you lost the contorl file
    1>If you have old copy of Contorl file,
    which has the current structure of the
    database and all the archive files then
    you can recover the database with
    Ponint in time recovery (Using Backup Controlfile)
    suresh

Maybe you are looking for