Automator script search document for file name, and rename file to date

Hi all,
I'm having a hard time with Automator... and I can't figure out how it's done!
Searched the web for it a couple of times, spend hours with Automator already, but I guess my need is random!
The thing is:
I got a folder with 1066 files, all the files has random names.....
I got a document (now it's html, but can convert it to PDF or txt or so ever....) with the coressponding random file names in the html.... some words before that there is the date the photo was taken in this format: 08/25/11
Now I want somehow make automator search that folder each filename... match it in the document with the filename, and rename the files in the folder to the date the photo's were taken.... and that for all 1066 files.....
anybody a great idea? Some help? I'm a real newby at Automator scrips!
thanks

Have you considered A Better Finder Rename 9?
A Better Finder Rename 9: The Batch File Renamer for Mac OS X
Otherwise, what you propose seems to be rather like carving the Pieta using a plastic butter knife. But, if you want, here's one example of a rough algorithm to start ...
* translate the HTML to ASCII text in this format:  filename (date)
* read one line at a time from the ASCII file
* for each line, search the folder for the file
* rename the file according to the (date)
BTW, you might avoid a strict renaming according to just the date.
Best luck with this project.
JJW

Similar Messages

  • I can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name

    can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name. My original external has an error and needs to be reformatted but I dont want to lose this informations its my entire Itunes library.

    Sounds like the source drive is formatted as case sensitive and the destination drive is not. The preferred format for OS X is case insensitive unless there is a compelling reason to go case sensitive.
    Why can't you change the filename? Is it because the source drive is having problems?  If so is this happening with only one or two or a few files? If so the best thing would be to copy those over individually and then rename them on the destination drive.
    If it is more then you can do manually and you can't change the name on the source you will have to reformat the destination as case sensitive.
    Btw this group is for discussion of the Support Communities itself, you;d do better posting to Lion group. I'll see if a host will move it.

  • Information about file Id, Logical file name and Physical file name

    Hi All,
    I am testing one program. Selection screen has 3 parameters, File Id, Logical File Name and Physical file name. In Physical File name, i am giving complete file name with path. But it is giving error. Please tell me, what is File id and what all information i need to enter for logical file name and physical file name.
    Thanks
    Puneet Aggarwal

    hi,
    try using this for filename.
    parameters : p_file like rlgrap-filename.
    Thanks,
    Gaurav

  • Logical file names and Physical file names

    Hi Guys...
         Can you let me know what is the difference between Logical file names and Physical file names?
    Regards,
    Rohit

    Using Logical Files in ABAP Programs http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95e635c111d1829f0000e829fbfe/content.htm
    Creating and Defining Logical Filenames
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3df8358411d1829f0000e829fbfe/content.htm

  • Dynamic File Name and Directory File Sender Adapter

    Hello gurus,
    I have a question: Is there any way to make the File Name, and Directory Dynamic of a File Sender Communication Channel ?
    For example, taking it as a parameter from a Web Service Request.. (I mean, the only way with this would be a ccBPM). I don't exactly know if there is a way, I just thought about this.
    Please tell me if someone could make Dynamic these 2 parameters while picking a file.
    Regards,
      Juan

    oops,thought i was replying to the PgP question:)
    I think you should be able to achieve this via adapter module but i m not really sure how exactly it will be done .
    Thanks
    Aamir
    Edited by: Aamir Suhail on Jul 28, 2009 1:42 PM

  • How to have files have 2 names, my file name and client file name?

    I need to name files for a corporate client in a very specific way for them, however I'd rather also keep my file name structure. I could output the files and rename them, but then when they come back to me and ask for retouching etc on a particular file, I wouldn't have that name in my archive (I'm delivering several thousand files).
    Is there a way to have 2 files names associated with the files, or embed the original file name in the files metadata somewhere. Please keep in mind there are several thousand files, so need this to be automatic.
    Thanks!

    The way I solve a similar problem is to give each photo a copy name that matches the client's requested name. Then export the files with the option to rename using the copy name and send them. This way I can maintain my own naming structure and keep track of the files sent under a different file name. I do it in a much, much, smaller scale (tens of images at most each time) and it works really well for me, but using this method for several thousand images can be a huge task, that I'd rather not take
    HTH

  • Shell Script to grep Job File name and Log File name from crontab -l

    Hello,
    I am new to shell scripting. I need to write a shell script where i can grep the name of file ie. .sh file and log file from crontab -l.
    #51 18 * * * /home/oracle/refresh/refresh_ug634.sh > /home/oracle/refresh/refresh_ug634.sh.log 2>&1
    #40 17 * * * /home/oracle/refresh/refresh_ux634.sh > /home/oracle/refresh/refresh_ux634.sh.log 2>&1
    In crontab -l, there are many jobs, i need to grep job name like 'refresh_ug634.sh' and corresponding log name like 'refresh_ug634.sh.log '.
    I am thinking of making a universal script that can grep job name, log name and hostname for one server.
    Then, suppose i modify the refresh_ug634.sh script and call that universal script and echo those values when the script gets executed.
    Please can anyone help.
    All i need to do is have footer in all the scripts running in crontab in one server.
    job file name
    log file name
    hostname
    Please suggest if any better solution. Thanks.

    957704 wrote:
    I need help how to grep that information from crontab -l
    Please can you provide some insight how to grep that shell script name from list of crontab -l jobs
    crontab -l > cron.log -- exporting the contents to a file
    cat cron.log|grep something -- need some commands to grep that infoYou are missing the point. This forum is for discussion of SQL and PL/SQL questions. What does your question have to do with SQL or PL/SQL.
    It's like you just walked into a hardware store and asked where they keep the fresh produce.
    I will point out one thing about your question. You are assuming every entry in the crontab has exactly the same format. consider this crontab:
    #=========================================================================
    # NOTE:  If this is on a clustered environment, all changes to this crontab
    #         must be replicated on all other nodes of the cluster!
    # minute        (0 thru 59)
    # hour          (0 thru 23)
    # day-of-month  (1 thru 31)
    # month         (1 thru 12)
    # weekday       (0 thru 6, sunday thru saturday)
    # command
    #=========================================================================
    00 01 1-2 * 1,3,5,7 /u01/scripts/myscript01  5 orcl  dev
    00 04 * * * /u01/scripts/myscript02 hr 365 >/u01/logs/myscript2.lis
    00 6 * * * /u01/scripts/myscript03  >/u01/logs/myscript3.lisThe variations are endless.
    When you get to an appropriate forum (this on is not it) it will be helpful to explain your business requirement, not just your proposed technical solution.

  • How to view long file names and sort files within folders/projects?

    Hello, like so many people here, I am a new mac user, but certainly not computer illiterate. I have been a professional photographer for 10 years and recently change to mac and have been slowly trying to adapt my work flow accordingly.
    However I have become increasingly frustrated with Aperture 3 and after reading posts here it looks like I am certainly not the only person. While in my case I am sure it is because of my inexperience with mac systems so any guidance or assistance is much appreciated.
    Hopefully my questions are simple. I have been importing my images and re-naming images as I do so. A very simple combination of date, custom name, and counter. However, when I look at the images once the import has completed, they are not in any logical order within the 'project'. I have tried to sort them by file name, orientation, file size, etc, both ascending and descending, but they will not list in the correct order. eg the file '2010-03-09 Lyon France 001', continually falls between '2010-03-09 Lyon France 022' and '....021'.
    This has also lead me to a further question. While my file names can generally be read when the image is a landscape format, on the portrait images the file name it too long for me to read the whole name, and I can not find anyway to read the file name, eg browser, split screen, viewer, or full screen.
    Im sorry for all the details, and I am sure it is just my lack of experience, so appreciate your help.
    PS. On a separate note, I notice on another thread from the frustrated user 'ultratechy' that he got a reply from Tony who stated 'Also after installing any application you should always run disk utility and repair permissions....' Now as I am completely new to mac, I had no idea about this. Any other tips that I should always be aware of? Thanks again.

    Thanks for your reply Calx. If it makes you feel better, I am actually a New South Welshman - just living in the sunshine state!
    You are correct, I am trying to get my head around a new way of working and thinking, but I suppose it will all become clearer as time goes by. I have re-visited the manual many times, and been doing loads of research online, but just trying to put it all into practice now, so any tips or advice is always appreciated.
    At the moment, I am just working with a small part of my library until I do get my head around things before moving onto the bulk of my images. I have my images stored and backed up on multiple external hard drives. I am trying to import my images into aperture from an external drive as I have been slack over the years with keywording, metadata, organising, etc etc, so I figure from what I have read that aperture may assist me with making these time consuming tasks a bit quicker and easier.
    I have put a bit of thought into my filing structure, but I am sure that with further use and understanding, this may change in the future, but I hope not. To give you an example of how I am thinking and working - I have used folders for my regular clients, eg, Ray White, and then made another level of folders within 'Ray White' for the date, and then in each 'date folder' I place my projects and name them with the address of the property I have photographed. I select and edit images from each project and place them in albums under each project. Not sure if this is the most perfect structure, but any advice is welcome.
    Keywords is always an issue with me. Over the years I have compiled a number of list for each client and each 'type' of photography. For example, real estate images have there own list, I just simply manually add keywords for specific jobs, eg the address and any specific location or features.
    Again, advice and guidance always welcome and I would appreciate how you go about these topics? And maybe you can help explain something that I have pre-emted may be a problem, and it may happen when I move onto my larger library, and I am not sure how to explain this as it may show my lack of management previously. When I worked on my PC, I used PS4, Adobe Bridge and Camera RAW pretty much exclusively. For my landscape images for example, I might have 2 or 3 variations of the one images, eg, black and white, sepia, and color for instance. But the file name remained the same, I just stored them in different folders indicating what version of the image was stored there. Now I am thinking that when I import images in Aperture, I will come across difficulties because Aperture will think the I am importing duplicate images because I will in fact have 3 images with the same file name, even though the adjustments I have made to them are different. Is this the case? Will I have to make adjustments again? Will I have to change the name of the files prior to importing? If so, any advice or tips?
    Well, I should stop there. Im sorry to bombard you with some much text, but as mentioned, I am new, and finding my feet, so thanks for your time.

  • Display images with same file name and different file types.

    I want to write a method, which receives file names (image1, image2, image3) but without the extension. This method will handle most of the image types (.jsp, .png, and ...) , what is the best way to write the method? Should I loop through all the image types for a given file name? I really don't want to do that...

    Topcan5 wrote:
    I want to write a method, which receives file names (image1, image2, image3) but without the extension. This method will handle most of the image types (.jsp, ..Since when are Java Server Pages an image type?
    .. .png, and ...) , what is the best way to write the method? Should I loop through all the image types for a given file name?.. Sounds reasonable.
    ..I really don't want to do that...Why not?
    As an aside, this entire task sound suspicious. Why on earth would you need such a method?

  • When I download files, firefox is adding " .part " to the file name and the file won't open, but if i back the .part out, it opens fine.

    Firefox seems to be adding " .part " to the file names of files I downoad. Here's an example:
    YuT9iNv8.pdf.part
    I cannot open this file because it can't find an application.
    If I back out the .part, I get a box asking if I want to change the extension to .pdf I check yes, and everything works fine. It doesn't happen with other browsers (Safai).

    I get the error message saying the file could not be downloaded due because there is no enough disk space.
    How large is your HD and how much space do you have left?

  • New mails received after IOS 5.0.1 update do not show graphics but instead unviewable file name and an attachment winmail.dat

    I sent out a mail, composed by outlook 2007 in HTML format this afternoon which contained graphics, to several of my friends and copied myself.  All of them had duly received the mail and were able to see the graphics in the mail in their iphones or ipads.  However, the copy that was extended to myself had only the unviewable graphic filename and also an attachment winmail.dat(which cannot be opened) from both my iphone and ipad (both updated with IOS 5.0.1).  Prior to this update, I had no problem of seeing graphics or photos in the mails received in both my ipad or iphone.  I ran couple of test mails and they all ended up the same.
    Any ideas??

    Turned out, it's the Microsoft SP3 update that caused the problem.

  • Dynamic File Name and File size

    Hi All
    I need some help in calling Dynamic File Name and Dynamic File size of a file in my adapter Module.
    Could you please provided some help on the same?
    I have tried the same through UDF it is working. Could anyone provide me the steps for the same
    Regards
    Abhishek Mahajan

    Hi,
    You can use the already available adapter module "DynamicConfigurationBean". Have this adapter module at the top of the module list in CC.
    Have the parameter value as insert http://sap.com/xi/XI/System/File FileName and http://sap.com/xi/XI/System/File SourceFileSize (corresponding to the key names)
    For more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/45/da2239feb22e98e10000000a155369/frameset.htm
    There is also a SAP note available for the same....dont remember the note number:(.....
    Regards,
    Abhishek.

  • Configure receiver file name as Sender file name

    Hi All,
        In PI7.1.  We have scenario(file to file). Here the sender system send multiple files and In the receiver system we need to populate the same filenames as Sender file Names.
    Could you please let me know is there a configuration to have Receiver file schem name As like sender file names.
    Thanks in Advance,
    Naga.

    Hi Naga,
    This can be achieved using either variable substitution or Dynamic Configuration by enabling Adapter Specific Message Attributes in sender and receiver file channels.
    If the sender file name and receiver file name needs to be exactly same then just check Adapter Specific Message Attributes in advanced tab of both sender and receiver channels. Check on File Name under that.
    Lot of help over this is already available in sdn, kindly serach and you will get lot of helpful blogs and wikis
    Regards,
    Gautam Purohit
    Edited by: Gautam Purohit on Apr 16, 2010 11:26 AM

  • Automator: Create folder from suffix of filename and put file names with same suffix into folder

    I've been using a script to use automator to create a folder from the filename and put that file into it the folder just created.
    I have a bunch of files that have similar names to them, but I don't want every file to be put into its own folder, instead I want all files with the same suffix (001) to go into the same folder.  I would also like the folder name to just be named the same as the suffix (001) instead of the full file name.
    For example all of these files names that end with the same integer (001) should be dumped into the same folder named "001":
    Boston_ProRes422_1920x1080_24p_Audio_001
    Boston_ProRes422_3840x2160_24p_Audio_001
    Boston_ProRes422_3840x2160_24p_RAW_Audio_001
    Boston_ProRes422_1920x1080_24p_Audio_002
    Boston_ProRes422_1920x1080_24p_Audio_005
    Boston_ProRes422_1920x1080_24p_Audio_010
    Any help at all would be incredible!!
    Thanks!
    Here's the script I'm using right now:
    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
      set {theContainer, theName, theExtension} to (getTheNames from anItem)
      try
      set destination to (makeNewFolder for theName at theContainer)
      tell application "Finder"
      move anItem to destination
      set the end of the output to the result as alias -- success
      end tell
      on error errorMessage -- duplicate name, permissions, etc
      log errorMessage
      # handle errors if desired - just skip for now
      end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
      set theContainer to the path of the container
      set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
      set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
      set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
      return (theParent & theChild) as alias
      on error errorMessage -- no folder
      log errorMessage
      tell application "Finder" to make new folder at theParent with properties {name:theChild}
      return the result as alias
      end try
    end makeNewFolder

    Thanks Neil for the response! That script didn't work, but I did get it to work with my old script by changing "set TheName to" numbers different.  Here's my final script which creates folders named "001", "002", and so forth and dumps in the files that end in that same suffix in the matching folder.
    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
      set {theContainer, theName, theExtension} to (getTheNames from anItem)
      try
      set destination to (makeNewFolder for theName at theContainer)
      tell application "Finder"
      move anItem to destination
      set the end of the output to the result as alias -- success
      end tell
      on error errorMessage -- duplicate name, permissions, etc
      log errorMessage
      # handle errors if desired - just skip for now
      end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
      set theContainer to the path of the container
      set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
      set theName to text -5 thru -((count theExtension) + 4) of theName -- just the name part
      set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
      return (theParent & theChild) as alias
      on error errorMessage -- no folder
      log errorMessage
      tell application "Finder" to make new folder at theParent with properties {name:theChild}
      return the result as alias
      end try
    end makeNewFolder

  • How to print file name and date on document

    How can we print the file name and date, like in the old days, on a document as a header or footer?

    Not the print dialog for iWork but in the app itself. Here is Pages:
    Regards,
    Colin R.

Maybe you are looking for

  • Windows 7 64bit can't print from quicken

    I have tried both my HP F4235 and C3150 printers with my new windows 7 computer running quicken.  When i try to print a report the printer acts like it is going to print (i.e.. the carriage moves, etc.) but nothing prints.  Nothing shows in the print

  • How to build my own SELECT-OPTIONS?

    Hi experts, I hv 4 values like for a field, (say VBAK-BNAME), NAME_A NAME_D NAME_M NAME_Z My selection- screen is like, SELECT-OPTIONS: MANAGER FOR VBAK-BNAME. So, 1) How to build the SELECT-OPTIONS table in my ABAP code? I mean, if the user enters t

  • Big problem installing Adobe Flash Player, please help?

    Please help. I tried to download Adobe Flash Player 5 times without success. Every time it states Installation succeeded, but I can't find it anywhere. I have to keep closing and opening Browsers without any reaction of the so called installed Flash

  • [SOLVED]Can't save a file with tex extension using vim

    Hello there people,i decided to learn LATEX but vi won't let me save my files with the tex extension.It says: "test.tex" E212: Can't open file for writing Does anyone know why vim is denying to save it with this extension?Please help! Last edited by

  • Error during the installation of OIM

    Hello all, After install oracle database(10.2) , oracle application server 10.1.3, i started both and try to install OIM in my machine(Rhel4), but when it question to me about informations of my application server (Username[oc4jadmin],password,rmi po