Batch Folder renaming according to file name.

Hi,
I work in a busy photostudio and I am currently using automator to process thousands of Images, compression, size, name changes ect. However there is just one process I am stuck on. I need to put these Images into folders that relate to the file name. I have a process that will do this that I found here. This works well but i need it to only look at a certain part of the file name.
For example if I had a collection of images like this,
azz55412_blue_3.jpg
azz55412_pink_2.jpg
azz55412_blue_6.jpg
azz78459_blue_1.jpg
azz78459_blue_3.jpg
azz65236_blue_7.jpg
The current process would place each one in a folder named after each image. Ideally I would like it to only look at the first part of the name ie azz55412 and create a folder called that and place any other images it finds with the same code in that folder.
Is this possible with automator or applescript?
Any help or suggestions would be appreciated!
Thanks,
Mark

Save the line below into a plain text file and give it the .jsx extension.
app.activeDocument.activeLayer.name = decodeURI(app.activeDocument.name).match(/(.*)(\.[^\.]+)/)[1];
Then create an action that runs that script. Then run File-Automate-Batch using that action.

Similar Messages

  • During restore of my backup on iphone 5s i saw my photos and videos get doubled on ios 8.0 and moreover if i use to go at my computer and then open my iphone and in folder i see some files name local disk and my photos please help my memory doubles.

    during restore of my backup on iphone 5s i saw my photos and videos get doubled on ios 8.0 and moreover
    if i use to go at my computer and then open my iphone and in folder i see some files name local disk and my photos
    please help my memory doubles.

    I'm not sure, but I know it's not recommended to upgrade to iOS 8 on anything older than an iPhone 5. I only lost my music playlists and music that was on my phone, but that music is also on my iTunes, not the playlists though, and I don't want to go through ALL my iTunes library to fix it either... But it seems I don't have a choice right now.
    Whatever you do, do NOT upgrade to iCloud Drive, keep iCloud till OS X Yosemite comes out, if your computer is a Mac. I also just noticed that all my documents on my phone are gone from Pages, BUT if I go on the iCloud website they are still there. Hopefully it will all work itself out when I can update my macbook pro to OS X Yosemite.
    If you backed up your phone and all your purchases off your iPhone prior to trying to upgrade you should be fine... But I'm not even remotely sure.

  • How to automatically rename tracks according to file name

    Hi all,
    this is probabaly a very simple fix but for some reason its foxing me today,
    in CS6 when importing multiple audio files, is there a way of automatically naming the tracks the same as the file name.
    eg if the file is labeled 'snare.wav' and you import it into Track 1, then the track is then renamed 'snare'
    thanks.

    Thanks for the reply Steve, I understand the implications your refering to, I just wondered if there was an option to turn this on if required, so for instance if i am importing 70 or so audio files i dont have to go through and name each track one by one.
    something similar to the 'Use Audio File Name as Track Name' option in Logic would be useful.
    regards

  • Not renaming attachment xml file name in receiver mail adapter

    Hi,
    I receive SOAP from GRC and need send to Partner an email.
    I have  SOAP to MAIL scenario where an xml file is picked up and transformed and zipped into the target format in XI which has to be sent as an attachement in an email on the receiver side.
    I am getting the mail with the attachement. But I would like to rename the attachment as the name "NFE.XML" and the ZIP File as the name "nfe.zip"
    I am using MAIL adapter with Modules above.
    Number  Module Name                                                                          Module Type                       Module Key
    1             AF_Modules/PayloadSwapBean                                           Local Enterprise Bean        Transform
    2             AF_Modules/MessageTransformBean                                  Local Enterprise Bean        ContentType
    3             AF_Modules/PayloadZipBean                                                Local Enterprise Bean        zip
    4             sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean    Local Enterprise Bean        mail
    Module Configuration :
    Module Key                           Parameter Name                Parameter Value
    Transform                             swap.keyName                 payload-name
    Transform                             swap.keyValue                 NFE
    ContentType                         Transform.ContentType    application/xml; name="NFe.xml"
    zip                                         zip.filenameKey                ContentType
    zip                                         zip.mode                           zip
    I  am using transport protocol  "XIPAYLOAD" and set  "KEEP ATTACHMENTS"
    I have with result example above :
    Name from ZIP              :  PayloadName.zipu200E(4KB)u200E
    Name from attachment :  PayloadName
    Regards,
    Ricardo

    Hi Shobhit,
    The module tab of your mail adapter will look like this.
    Processing Sequence
    Module Name                                                            Type                                      Module Key
    localejbs/AF_Modules/MessageTransformBean   rename LocalEnterpriseBean     
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  mail     Local EnterpriseBean     
    Module Configuration
       Module Key               Parameter Name             Parameter Value
          rename      Transform.ContentDescription                      File
          rename  Transform.ContentDescription  attachement;filename="yourfilename.ext"                                                          
          rename            Transform.ContentType                 application/text;name="yourfilename.ext"
    Thanks
    Amitanshu

  • Adding batch serial number to report file name in sequential model

    Hi,
    I'm using a Sequential model in TS 4.0 and have learned how to add the UUT serial number to the report file name. But I would like to add the batch serial number instead. Is this possible? Any modifications to the ReportOptions callback seem to only modify the temp report name.
    Thanks!
    Chris

    Hi Chris,
    While Paul's suggestion may be useful in this case, if you would like the flexibility of customizing your Report File Pathnames further, you may want to consider upgrading to TestStand 4.2.
    In TestStand 4.2 we introduced predefined macros and the ability to use custom expressions to specify the Report File Pathname. For example, the <Batch> macro will add the Batch Serial Number to the Report File Pathname as you specify it.
    Please see the Using Expressions to Customize Report File Paths section of the TestStand 4.2 Reference Manual for more information on these new reporting features and how one might use them. For a specific explanation of the different macros and what they might be used for, please see the Specifying Report File Paths by Expression section of the TestStand 4.2 Online Help.
    Manooch H.
    National Instruments

  • Batch Convert PowerPoint to Movies file name issue

    I need to batch convert powerpoint presentations to movie. But the save option forces me to use the same name on every movie. I want it to just save the presentation with the same file name. So if the powerpoint is:
    MyPresentation.ppt
    then the movie should be
    MyPresentation.mov
    How can I do this?
    Here is a screenshot of the workflow.

    Okay, so I tried ditching automator and doing the convert movie parts via applescript. This is what I tried but it gives me an automator error -212 (apparently on the first "perform action") saying "expected end of line, found property":
    Any ideas on how to get the script to work with autmator (I tested a modified version of this script outside autmator and it does work for a single file).
    on run {input, parameters}
      -- Use the "Make Movie..." command in PowerPoint to make a QuickTime movie
              tell application "System Events"
                        tell application "Microsoft PowerPoint"
      launch
      open input
                                  set frontmost to true
                                  set theNameOfPresentation to title of last window
      -- Click on the Save as Movie... command in the File menu
                                  perform action "AXPress" of menu item "Save as Movie..." of menu 1 of menu bar item "File" of menu bar 1
                                  repeat until ((exists of sheet 1 of window theNameOfPresentation) is true)
                                  end repeat
      -- Enter the name of the Presentation
                                  set value of text field 1 of sheet 1 of window theNameOfPresentation to theNameOfPresentation & ".mov"
                                  delay 2
      -- Click on the Save button
                                  perform action "AXPress" of button "Save" of sheet 1 of window theNameOfPresentation
                                  delay 2
      close input
                        end tell
              end tell
              return input
    end run

  • Renaming the archived file name

    Hi,
    We have a requirement where we are archiving the file using sender FILE adapter but we need to change the file name when it is archived. I am unable to find any option in Comm channel to change/rename the File name.
    Pls suggest me is there anyway to achieve it.
    Thanks in Advance,
    sudha.

    Hi sudhasree,
    Please have a look at the following link and see if it helps you
    Re: Archiving With FTP Receiver
    It tells about how you can archive files with different name, time and dates format.
    Also,
    Please go through this link as well
    Re: Archiving files
    Best Regards
    Edited by: Prakash Bhatia on May 8, 2009 2:53 PM

  • URGENT: Choosing target directory according to file name.

    Hi
    I have a requirement for transfering a file to the directory according to the filename.
    Example
    If the file name is
    FIABC it should be moved to directory DI_ABC in the target server and if it is
    FIXYZ it should be moved to directory DI_XYZ.
    No mapping is involved in this case .
    Do we have some other way around than variable substituion
    Regards
    Abhishek mahajan

    Hi,
    For this we have to configure Two Communication Channels one for one Location and the other for other location.
    Use X-path concept in Interface Determination and call the corresponding inbound Message Interface and Interface Mappings based on the condition
    1) Create Two Inbound MI's
    2) Create One MM
    3) Create 2 Interface Mappings
    4) Create 2 Receiver CC and One Sender CC
    5) Create One Receiver Det
    6) Create 2 Interface Det
    7) Create One Sender Agreement
    8) Create Two Receiver Agreements
    Regards
    Seshagiri

  • IWeb 1.12 bug: folder-photos have original file names!?!?

    Hi, I've been using iWeb for a while now, but came across a strange bug which creates a problem for me. I had about 180 jpg photos on my mac which originally had particular file names. I manually changed the file names in the finder (for each of these - say, from a file name that might have been something like 1a.jpg to one that might be 1-Wayne.jpg, then drag-drop imported them into iPhoto, reordered them in iPhoto, then exported to iWeb (onto two pages since it will only take 99 photos on any one page), then exported from iWeb to a folder that I plan to upload to a server.
    I noticed while trolling through the newly-created folder with the images, that while some of the file names are the new ones, quite a few of them retain the old file names! How the heck did that happen? Since in the published website (i.e. via a browser) all the new names show, it is not a problem for the website per se. But I am also making an image-map file which links to these photos, and since I have so many photos, it is very confusing since some of the files that iWeb created use the new file names, whereas others use the old names. I would rather recycle the iWeb-created images rather than to upload entirely new ones (e.g. with the new names).
    Anyone know what's going on here? Solutions or workarounds?
    Baffled and flustered,
    Wayne

    Welcome to Apple Discussions,
    You are doing nothing wrong.
    I have noticed the same behavior change between iPhoto '08 and iPhoto '09.
    When you make a change to the name of the Event that name change takes place within the database that governs the iPhoto Library of pictures, not in the "physical" structure of the iPhoto Library (as you pointed out).
    Any changes you need to make should be made through the iPhoto interface (iPhoto is an image organizer after all. Thats what it's made for.), not by going inside the iPhoto Library package (Which is where you see those folder names. Making any changes within the package can damage the library. )
    That said if you think that the naming structure is a feature you would like to see in future versions of iPhoto you can let Apple know. iPhoto > Provide iPhoto Feedback.
    Hope that helps.

  • Rename e-mail file names

    I just noticed that my archived e-mails have file names that are number strings and have nothing to do with the subject line. Is there third party software capable of opening the mail, a renaming the file based on the subject line? Does anyone have an Automator workflow capable of doing that? All help appreciated.

    I just noticed that my archived e-mails have file names that are number strings and have nothing to do with the subject line. Is there third party software capable of opening the mail, a renaming the file based on the subject line? Does anyone have an Automator workflow capable of doing that? All help appreciated.

  • Create Folder according to file names

    Hello, I've been trying to do something "I thought" would have been very simple to do with Automator but with no success so far.
    Work required: I have a single folder (let's call it Root) that contains a lot of files (note there are only files, no subfolders under Root). I want to make a workflow that will create a separate folder within Root based on each file's filename and the respective files will be moved into this folder (note just the filename, no extension.)
    Example: Say I have 2 files in Root right now - ABC.zip and XYZ.avi. After I run Root through the workflow, 2 folders will be created within Root, called ABC and XYZ, containing ABC.zip and XYZ in each folder, respectively. There will be no more files within Root but subfolders.
    I tried a few times but not sure how I can get the filename of each file and create a folder accordingly. Thanks for the help!!

    Yes, It works like a charm.
    Still, I have some questions how to alterate.
    I have a library of movies that I unfortunately have in this way:
    ABC
         Adulthood.avi
         Adulthood.jpg
         Apocalypto.avi
         Apocalypto.jpg
    When I start the script it runs perfect until it comes to Adulthood.jpg and can not go on because the folder with that name already excist.
    I would like to change the script so that it goes through all files with a certaing extension and moves all files with the same name (no matter what extension it has)
    Does anyone know how to do this change in the script?
    The best thing would be to be able to write something like this:
    (file extension: .avi;mpg;mpeg;mkv etc)
    /Anders

  • Batch Rename Part of File Names

    Bridge CS3 and Windows XP Home. Have a set of files having names like: ijc-552346-c01_lay, ijc-552552-c01, ijc-552345-c552, ijc-552657. Wish to change the ijc-552 portion to ijc-559; for example, ijc-552346-c01 to ijc-559346-c01, ijc-552552-c01 to ijc-559552-c01, ijc-552345-c552 to ijc559345-c552 and so on. Need help on proper parameter set-up to do a batch file rename. Have hundreds of files to change.

    Thanks Curt and Olaf for the suggestions.
    Since I am not script literate decided to check for utilities. Just downloaded v8 of "Flexible Renamer" which is free, seems to offer plenty of function and has some good reviews. Will give it a try!
    Joe

  • I accidentally renamed all the file names on every single one of my 24000 photos in aperture using batch change ( keywords, metadata etc) Can I undo this action or will I need to restore from an earlier time machine/capsule backup?

    Undoing a batch metadata filename change in Aperture3?

    You're welcome.
    A second copy of the iPhoto library on a second drive is always good. I once lost my backup drive and the system drive at the same time, because a lightning caused a power surge that killed both my macs system drive and the connected backup drive. I was lucky to have a bootable clone of the system drive as a second backup.
    I like this version of the quote you cited:
    A little learning is a dangerous thing;
    drink deep, or taste not the Pierian spring:
    there shallow draughts intoxicate the brain,
    and drinking largely sobers us again.

  • Picking pictures in a folder by typing in file name

    When I am working in Bridge and have a long list of reprints that I need to print from a wedding I just go to that wedding folder and type in the file number of the first picture.  This pictue is then highlighted and I give it a two star (or whatever) rating.  I do this for all of the pictures on my list so when I am done all of the pictures to reprint have a two star rating.  I just move these into a temporary folder and retouch and print from this folder.   Is there a way to do this in Lightroom?  I am new to Lightroom and cannot find a way to do this.

    You can rename the way you want. Like Paige says, select your images and hit F2.
    Now it gets a wee bit tricksy:
    Choose Custom Name - Sequence in the File Naming: box:
    Now if you go with that one, there won't be any leading zeros, so click on Custom Name and choose Edit...
    Click on "Sequence # (1) and choose one that has enough leading zeros that the sort order will be maintained, probably 3 or 4 should do it. See the arrorw.  Before you click Done, click in the Preset box at the top and choose "Save Current Settings as New Preset". You don't want to go through this every time.
    Now hit "Done".
    Type custom text of your choice in the Custom Text: box and hit OK.
    Hal

  • Batch folder rename

    Is there a way to batch rename folders? I have a series of folders that I have inherited and they all have a digit at the end which I would like to remove. I really don't want to do this manually.
    I've looked at Automator but can't see a solution there.

    Use the following AppleScript when the enclosing folder is in the frontmost Finder window:
    tell application "Finder"
    repeat with this_folder in (get folders of window 1)
    set name of this_folder to (items 1 thru -2 of (get name of this_folder)) as string
    end repeat
    end tell
    (57766)

Maybe you are looking for

  • Loading ntext data from MSSQL into Oracle - field locations vary

    Good afternoon/evening everyone I'm looking for a practical solution to a data migration issue I am running into. Here's the detail. 1. Source database is Microsoft SQL Server 2008 R2 2. Destination database is Oracle 11g R2. 3. Migration strategy: U

  • Sharing an iPhoto Library

    Hello, I run an iMac at home and currently do not use iPhoto at all.  Part of the reason for this is that my wife uses a Windows PC and I have yet to work out a way to share iPhoto effectively.  Anyway, I am close to buying a MacBook Air for her and

  • Thread: Process exit code 1073741819

    I am using JDeveloper 10.1.3 and specifically JSF technology to build a web application. Lately some pages stopped working or displaying with the command line of JDeveloper displaying the following error: "Process exit code 1073741819". Where can I f

  • Premiere cs6 project manager export failure

    Every time I try to use Project Manger to condense, then Collect Files and Copy to New Location, I receive and error message and the export fails. [/Volumes/BuildDisk/builds/MightySilt/PremierePro/Mezzanine/Make/Mac/../../Src/ProjectMana gerImpl.cpp-

  • Delta extraction issue

    Dear all, We are doing an delta extraction from 2LIS_01_*.  Delta update is not successfull with the following error messages. :error while transfering the data :error occured in the source system could anyone  help to fix this issue? Thanks, Krishna