Remove portion of filename

Hi,
I am trying to rename some files, or to be precise remove part of the filename instead. The part of the filename I wan't to remove is different from file to file. The files have two segments, the first part is a set of letters that I wan't to take a way. The second portion of the filename is a sequence number, which I would like to keep. The tools I have found so far, will only add to the new filename, or you have to change the whole filename.
Not sure if I asked a clear question but I hope someone still understand what I am looking for.
All help will be appreciated
Best Regards
Ketil V.

note:
Snow leopard's script editor is called /Applications/Utilities/AppleScript Editor.app.
Also in snow leopard, Automator has some prebuilt functions for renaming files that can easily
used to build an automator workflow used to find and rename files.
Here is a little app I found you might want to try:
http://web.mac.com/mickeyroberson/MRR_Software/NameChanger.html
Here is another app:
http://manytricks.com/namemangler/

Similar Messages

  • Remove [convert] in filename (VBscript)

    Hello,
    I rewrote a JS code in VB. Everthing works fine except the red lines.
    I open an eps-file, the script resaves the file as AI (remove the [converted]) and place the file in the same directory as the original eps-file.
    A single file with a correct path (eg c:\test.eps -> c:\test.ai) works fine.
    Set appRef = CreateObject("Illustrator.Application")
    'new inserted
    var doc=appRef.ActiveDocument
    var destFile = appRef.Documents.add(decodeURI(doc.fullName).replace(/(?: \[Converted\])?\.eps$/, '.ai'))   'also remove "[Converted]" from filename
    Set saveOptions = CreateObject("Illustrator.IllustratorSaveOptions")
    saveOptions.Compatibility = 15 'Illustrator CS5
    saveOptions.EmbedICCProfile=true 'embed ICCprofile
    saveOptions.Compressed=true
    saveOptions.PDFCompatible=true 'pdf output
    appRef.Documents(1).SaveAs (destFile), saveOptions
    appRef.Documents(1).Close 2
    Set appRef = Nothing
    I hope someone can help me

    Great about the calling procedure for "saving"!
    1 problem: the doscript doesn't work.
    I created an action: test in default actions, I runned the vbs-script by File>script>other script>open the vbs-script and then I get an error:
    "The do script command cannot be executed from the scripts menu"
    I read in the reference guide:
    Plays an action from the Actions palette.
    Note:
    Use DoScript only if you intend to run your script from an application external to Illustrator, such as the Windows® Script Host.
    Calling DoScript when running a script from Illustrator’s File > Scripts menu may yield unexpected results.
    Other suggestions to solve this problem?

  • Remove the mouseover filename from a PDF document

    I'm trying to generate a PDF using Adobe Acrobat X Pro through the Word 2007 interface.  When I generate my PDF and mouseover an image, the mouseover text displays the filename of the image file (ie mouseover text="ImageFilename.png").  Additionally, some of these aren't even correct (the image filename is actually a previous revision of the image file and not the current file).  I would like to know:
    -What data does Acrobat poll to get these filenames.  I know it isn't the actual filename since some are incorrect, so it must be some data contained in the word document itself?
    -How can I remove this function altogether?  There is no significance to the image filenames and I'd rather not have to ensure they all match the document text.
    I have searched this and other forums but can't find instructions on how to do this. Any help would be greatly appreciated.
    Thanks!

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Scribby182 wrote:
    -How can I remove this function altogether?  There is no significance to the image filenames and I'd rather not have to ensure they all match the document text.
    I'm not aware of anyway to automatically remove them from the pdf file. You can manually remove each of them but it's always better to treat the source file than to treat the PDF file for changes.
    To keep from seeing them without having to remove them all in Word, just use the "print method" to create the PDF file. Print to the Adobe PDF printer rather than using the Save as Adobe PDF feature.
    Regards,
    Joe

  • Removing spaces in filenames but keeping them at the top of the page

    I would like to change the filenames to remove the spaces, but I would like the top of the webpage that includes the links to the other pages to maintain the spaces. I know I can do this by hand, but that is cumbersome- is there a way to automatically do this in iWeb? Or are the link descriptions always tied to the filenames?
    Thanks,
    Sarah
    1.83 GHz MacBook Pro   Mac OS X (10.4.4)   3.2GHz Pentium 4 Suse and 4GB iPod mini

    Sarah
    I use MassReplaceIt to amend the names at the top of the page, see the Home Page of www.willg4pb.com. In iWeb the page is called Home, but what you see in the header is Welcome to www.willg4pb.com.
    I simply find <title>Home</title> and replace with <title>Welcome to www.willg4pb.com</title>
    There is an example of using MassReplaceIt on the How2 page of www.willg4pb.com, showing how to insert favicon text.
    You can set up multiple searches in one query and save the query, I think its a great app, its donation-ware, so please do support the developer (I have no association with the app, I just think that its really useful ).
    You need to run the query each time you make a change that effects the html file, so dont forget to save your query for use later.
    Will

  • Remove numbers after filename and add custom sequence?

    Hi,
    I have to rename quite much of rendered frames which names are like aoPass_000001.png...aoPass_099999.png. I have to replace those numbers to start from 0111111 for example witch I'll input manually when I run rename process. Right now I do it using Automator's Make Sequential and writing new name for it and giving new starting number. Yes, it's doable, but must be some better way to do?
    Also I have few different passes so file structure is like:
    - renderPasses
             - alphaPass
             - aoPass
             - beautyPass
    So I'd like to run for all sub folders at once if possible. They all do share same sequence numbers so maybe remove 6 characters from end might work keeping front side untouched.
    Doable with combinations of Automator or should I learn some Apple script...?
    Thanks!

    Applescript and Automater are discussed in Mac OS X Technologies
    I'll see if a host will move this.

  • Removing portions of generated XML

    Is there a way to remove the header of the generated XML and the rowidattributename from the row element using xmlgen package?
    <?xml version = '1.0'?> <----REMOVE THIS
    <negotiation_row eno="57388"> <---REMOVE THIS

    No way to avoid the XML declaration, but you can use:
    setRowIdAttrName('')
    to avoid getting a rowid attribute.
    If you use do subsequent XSLT transformation, you can use the:
    <xsl:output omit-xml-declaration="yes"/>
    to avoid the XML declaration as part of the transformed output.

  • Removing Portions of Slides

    I would like to delete about half of a slide, not just
    shorten the legth of the slide, but delete the first half, which
    contains typing I want to remove. Does Captivate have a function to
    split a slide?

    cheryl3, yep, you are "not getting something" (my dearly
    beloved tells me that a lot - grin). The typing either "is" or "is
    not" there. The actual typed input cannot be altered once it has
    been captured, it can only be shown, or hidden. And I'll save you
    the trouble of saying that's a "bug" ... it's not, it is just a
    feature that hasn't been given all its powers yet in version 2.
    To
    wdwnl, yes, you will have to start over, if I understand
    what you did wrong. OR you can follow the same directions I am
    sharing here with cheryl3...
    Both of you ... to work around this you can either re-record
    a few slides to correct the typing, or you can use a widget to
    "fix" the problem. The widget I refer to was created by a member of
    Adobe staff in a "free-lance" moment, and I don't have the FLA ...
    but I DO have the SWF widget, and a "readme" file that I wrote to
    explain how to use it. If you want it, write to me with a link to
    this forum page in the email, so I'll know what the conversation
    was. You can reach me at:
    CatBandit "at" PCABCs "dot" COM
    (email address is deliberately skewed to avoid the spiders)
    A last thought ... seems to me that my mate and fellow
    Community Expert Paul Dewhurst also created a widget that does
    about the same thing. I could be wrong, but the way to find out is
    to visit his site at:
    www.raisingaimee.co.uk
    Hope there is some value in here somewhere ... carpe diem !

  • Removing portion of the text

    Hi All,
    I have the following table, Full_Name column is the original data and Modified column is from Crystal Report Formula Field. I want to take out 'in Boston', 'in New York', and 'in Los Angeles' from the Full_Name and write it under Modified (as shown in the table). It would be a simple code, I tried it many ways but it's not working. Can someone help me writing the code please. Thanks - Brian
    Full_Name
    Modified
    John in Boston
    John
    Bell in New York
    Bell
    Tiger in Los Angeles
    Tiger
    Rodney in Boston
    Rodney
    Graham in Boston
    Graham
    Bill in New York
    Bill
    Marry in New York
    Marry
    Juaida in Los Angeles
    Juaida
    Felton in New York
    Felton
    Shawn in Los Angeles
    Shawn

    That would involve creating a variable that contains the city names and then extracting the names based on the values in the variable.
    1) Create a variable that contains city names and place this on the Report Header.
    WhilePrintingRecords;
    stringvar array city := ["Boston", "New York", "Los Angeles"];
    2) Create another formula that extracts the city names from the field on the details section. This goes in the Details section of course:
    WhilePrintingRecords;
    stringvar array city;
    local stringvar temp;
    local numbervar i;
    for i := 1 to ubound(city) do
         If Instr({Full_Name}, city[i]) > 0 then
              temp := city[i]
         else temp := "No City Found";
    temp;
    -Abhilash

  • Batch rename does not remove original filename

    Bridge CS4 ver 3.0.0.464
    Not sure what I am doing wrong but when I try to batch rename my files for some reason I cannot remove the origanal filename,
    I have checked the preferences and searched for a solution and have come up with nothing.
    Any help would be great. Thank you.

    This has fixed the issue, however it is not really an ideal solution as it deletes all custom preferences, was there not a way to to reset just the renaming preferences?
    Thank you anyway, I forgot about cntrl bridge!

  • How do I remove audio special effects, to go back to the original audio?

    I added some audioFX (from imovie library) to my clip. The chipmunk voice fx. But, I want to remove portions of it. The Help menu tells me to select the portions I want and press delete. When i do that, I lose all my audio. How do I just select the FX and delete that.
    I tried doing a search but couldn't find this specific answer.
    Thanks

    Was the Help reference you found specifically for audio FX, or was it for editing video clips? It sounds like it might have been for video clips. Although iMovie lets us select frames of a video clip in the monitor and remove them, there's no such command for editing audio. We can't use the monitor to remove the MIDDLE of an audio clip, for example.
    That doesn't mean you can't accomplish your goal, however. iMovie lets us do direct trimming of an audio clip, just like it does a video clip. It lets us shorten the audio from either end.
    We can't use direct trimming on the MIDDLE of an audio clip, of course, unless we first split the audio clip. Then we can use direct trimming to control playback of BOTH resultant clips. That lets us control the middle too.
    So as Matthew suggested, we can control the volume of portions of an audio clip, or split the audio clip and use direct trimming to control which sections to play.
    Note: if you're fiddling with the audio volume, be sure to UNcheck the menu command View > Show Clip Volume Levels. Until you do, you can't do direct trimming of the audio clip.
    Karl

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • HOW CAN I BATCH ADD ONLY THE FILENAME TO PDF?

    I saw a long thread about adding javascript code to insert date, time and filename. but it is an old thread that i cannot comment on.
    So please help me only add the filename to the footer
    This is the code that was poseted by Rindhard(sp?) This code adds all three.. I only want to have the filename but everytime I try to rem out a line it doesnt work.. i do not know java script obviously
    I want to add the filename in a calibri 12pt font
    thanks for any help!
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Date Time (Filename)", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " ->  Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " ->  Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    app.addMenuItem({ cName: "Set Page centered", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: " -> Set Page right", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(9)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(9)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
      var aRect = this.getPageBox("Crop",p);
      var TotWidth = aRect[2] - aRect[0]
      if (ARG<=3 || ARG==9)
       { var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
          fd.value =  util.printd(AcDateFormat, AcDate) + "   (" + FileNM +")";
           fd.textSize=6; fd.readonly = true;
           if (ARG==1){ fd.alignment="left" };
           if (ARG==2){ fd.alignment="center" };
           if (ARG==3){ fd.alignment="right" };
      if (ARG==4 || ARG==5 ||ARG==9)
       {  var bStart=(TotWidth/2)-(Box2Width/2)
           var bEnd=((TotWidth/2)+(Box2Width/2))
           if (ARG==5){var bStart=(TotWidth-Box2Width-30); var bEnd=(TotWidth-30);}
           var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
           fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
           fp.textSize=6;  fp.readonly = true;
           fp.alignment="center";
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==9) {var x = this.removeField("xftDate");}
    if (ARG==4 || ARG==9)
       {  for (var p = 0; p < this.numPages; p++)
          {var x = this.removeField(String("xftPage"+p+1)); }

    Not sure what you mean by "-30 high and -30 from the right". Isn't this supposed to be left-aligned?
    Anyway, try this one:
    this.addWatermarkFromText({ cText: this.documentFileName.replace(/\.pdf$/i,""), cFont: "Calibri", nFontSize: 12,
        nHorizAlign: app.constants.align.left, nVertAlign: app.constants.align.bottom, nHorizValue: 30 , nVertValue: 30});
    If you want to customize it further, look up the addWatermarkFromText method in the reference files. All the parameters are specified there.

  • Error submitting form for Distribution: "The filename you specified is not valid because it does not

    Error submitting form for Distribution:
    "The filename you specified is not valid because it does not include a .pdf extension, contains one or more invalid characters or teh path preceding it refers to a protected system location."
    Tried removing dashes from filename, shortenign filename, moving to root directory. No changes. File ends with a .pdf extension.
    This is my first attempt to distribute via acrobat.com

    I found that I got that same message using Acrobat Professional to send out a document for shared review.  I had an exclamation mark in the title of the PDF. When I took out the exclamation mark, it worked.
    So maybe try taking out anything "unusual" (parentheses, dashes, exclamation marks, etc.) in the file name and see if that helps.
    Good luck,
       Philip.

  • Removing vector elements

    hi there
    i have a vector, that has the contents of a directory as elements. in the post proccessing phase i trie to remove all elements that are .java files or are class files that end with Options.class or Options$1.class.
    i use this code
    for(int i=0; i < plugins.size(); i++) {
       theFilename = plugins.elementAt(i).toString();
       System.out.println("TheFilename: "+theFilename);
       if(theFilename.endsWith(".java") ||
          theFilename.endsWith("Options.class") ||
          theFilename.endsWith("Options$1.class")) {
            System.out.println("Removed: "+theFilename);
               plugins.remove(theFilename);
    }the problem is, that that code always leaves one element in the vector, that should be sorted out by this loop. anyone an idea ?
    - rebel

    Hi jaylogan again,
    i read your second answer. I use the methods of the file-class. So it seems better to paste the whole method in here. note, the for loop, that removes filenames is twice there. after first test i found ou, that the second loop is removing the last filename that should not be in the list. that worked as long i had only one plugin in the plugin directory. when i added a second plugin the double for-loop was not working anymore. there is still an element left that should not be in the list.
    sourcecode:
    public void createPluginList() {
              String theFilename;
              String plugInDir = getCurrDir()+File.separator+"plugins";
              File dir = new File(plugInDir);
              FilenameFilter filter = new FilenameFilter() {
                   public boolean accept(File dir, String theName) {
                        return theName.startsWith("Pi");
             String[] contents = dir.list(filter);
             if (contents == null) {
                   // Either dir does not exist or is not a directory
              } else {
                   for (int i=0; i < contents.length; i++) {
                        plugins.addElement(contents);
              System.out.println("------------");
              for(int i=0; i<plugins.size(); i++) {
                   System.out.println(plugins.elementAt(i).toString());
              System.out.println("------------");
              for(int i=0; i < plugins.size(); i++) {
                   theFilename = plugins.elementAt(i).toString();
                   System.out.println("TheFilename: "+theFilename);
                   if(theFilename.endsWith(".java") ||
                   theFilename.endsWith("ptions.class") ||
                   theFilename.endsWith("ptions$1.class")) {
                        System.out.println("Removed: "+theFilename);
                             plugins.remove(theFilename);
              System.out.println("------------");
              for(int i=0; i < plugins.size(); i++) {          // I dont know why i have to run this
                   theFilename = plugins.elementAt(i).toString(); // a second time, but only then
                   System.out.println("TheFilename: "+theFilename); // it works
                   if(theFilename.endsWith(".java") ||
                   theFilename.endsWith("Options.class") ||
                   theFilename.endsWith("Options$1.class")) {
                             System.out.println("Removed: "+theFilename);
                             plugins.remove(theFilename);
              System.out.println("------------");
              for(int i=0; i<plugins.size(); i++) {
                   System.out.println(plugins.elementAt(i).toString());
    -rebel

  • Roadside Assistance Removal

    How do I remove roadside assistance from a phone under my plan? It does not show up on the add/remove portion when looking at accounts features.

    If you can't remove it yourself via your on-line My Verizon account, you could call Customer Service and have them remove it.
    Customer Service
    Dial *611 from a cell phone
    (800) 922-0204
    Monday - Sunday 6 am - 11 pm
    - at the phone tree press 4 for Other and then say Agent

Maybe you are looking for