Script to remove the first few characters of a PDF file name?

I know it should be easy, but I'm not a coder and don't have many opportunities to write scripts.  I hope it's like a second request two anyone out there.  All I want to do is point a script in a PDF file that will review the file name, cut the first two characters of the file name and save the original file again.  I need to do this about 400 PDF documents on a recurring basis, hence the need for a script.  Thus, for example, if I have a C:/temp/myFile.pdf file, I would the script to rename the file to just "file.pdf".

Any help would be greatly appreciated.

JBF

Use this code in your action (note that this will not work if your file name)

contains the comma):

var filePath = this.path.replace(this.documentFileName,"");

var NouveauNomFichier = this.documentFileName.substring (2);

this.saveAs (filePath + newFileName);

Tags: Acrobat

Similar Questions

  • How to remove the first few characters of a string of liquid

    I would like to delete the first three characters of a string of liquid. The question is how.

    If I use the markup according to liquid when I know what are the first characters

    {{it. {{["Estate status'] | strip_html | remove_first:"11."}}

    It will remove the 11 characters.

    But if I don't know what are the first characters, this markup can I use to get "RID" of the first three characters?

    I tried 'split' and 'slice', but it must always know what characters to split or slice.

    Thanks for any help.

    Kind regards

    Carla

    Assign a value into slices and you can have table data that you can get out.

  • I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    Example:

    Text Example.JPG

    I need to remove these numbers PXXXXXX. Leaving the other characters.

    Thank you

    Bob

    A normal 'substring' is what you're looking for.

    For a formula of the column in the response criteria tab:

    SUBSTRING ("YourPresTable". "YourPresColumn" OF 9)

    To make the RPD and the workload of shipping off the coast to the database rather than forcing the work on the server of the OBI or presentation:

    Substring ("01 - Sample App Data (ORCL)" ".." ") "" "BISAMPLE '." " D10 product (dynamic table)". ("' Prod_Dsc ' 9)

  • How can I remove the first 3 characters of the files?

    I'm using the bridge for a while and rename the lot

    How can I rename to remove the first 3 characters of the files?

    (these are numbers)

  • How to remove the first 11 characters of a string

    With the help of ' XML Publusher Desktop / generator model for Word / 5.6 Build 45'

    I use XML Publisher. With the help of a RTF model, to generate purchase orders by email of the purchase of the Oracle.

    The fields are drawn from the XML code generated by Oracle.

    One of the fields is the place of delivery Description field.

    Will appear in the report as follows:

    * & lt;? SHIP_TO_LOCATION_NAME? & gt; *

    When I attach a test XML file in Word and view the output, one of my test case returns a description of the site:

    DON'T code USE County Hall of Global location

    What I have to do is to remove the * DO NOT USE * according to the description of the location.

    I could do is a Find / Replace, or a substring to ignore the first 11 characters from the string. But I don't know how to do it.

    Any help would be much appreciated, because it is a production problem that is causing a bit of a small problem for us!

    Thank you very much.

    Hello
    Maybe you know this syntax :)

    Rahul

  • How to determine the number of characters in a PDF file?

    Acrobat.com, how to determine the number of characters or words in a PDF file?

    Hi unk2,

    There is no feature in Acrobat.com online services to a number of characters. But, you could use ExportPDF to convert your PDF files to Word format and then create your character count in Word.

    Please let us know if you need help.

    Best,

    Sara

  • Delete the first 4 characters in a cell... (IND CS4)

    I need to delete the first 4 characters if the text of the cells begins by "< Cs.


    Is it possible without using "find/replace"?

    My script is something like that... 


    var doc=app.documents[0]; 
    var allTablesArray=doc.stories.everyItem().tables.everyItem().getElements();
    
    
    /************************************************************************/
    var TbCount = allTablesArray.length;
    for(var Tb=0; Tb<TbCount; Tb++) {
      var Tab = allTablesArray[Tb];
      var numRows = Tab.rows.length - 1;
      for(var R=numRows; R>=0; R--) {
      var numCells = Tab.rows[R].cells.length - 1;
      for(var Td=numCells; Td>=0; Td--) {
      var xCell = Tab.rows[R].cells[Td];
      var Content_3 = xCell.contents.slice(0,3);
      if (Content_3 == "<Cs") {
      //Remove the first 4 characters in the cell
      }
      if (Content_3 == "<Rs") {
      //Remove the first 4 characters in the cell
      }
      }
      }
    }
    //*****************
    
    

    Hello

    Try this...

    var doc=app.documents[0];
    var allTablesArray=doc.stories.everyItem().tables.everyItem().getElements();  
    
    /************************************************************************/
    var TbCount = allTablesArray.length;
    for(var Tb=0; Tb=0; R--) {
        var numCells = Tab.rows[R].cells.length - 1;
            for(var Td=numCells; Td>=0; Td--) {
            var xCell = Tab.rows[R].cells[Td];
            var Content_3 = xCell.contents.slice(0,3);
                if (Content_3 == "		   
  • The first 250 characters of the HTML output

    Is anyone know how the first 250 characters of html output file.
    I use a cfinclude to the output file, but sometimes the HTML is really long and there are other things on the page. I would like to limit the HTML for a number of characters and to give the user an option to read the rest.
    An example but this is not a job would be < cfinclude template = "#left(file.htm, 250) #" >. I know that this does not work, but he would if the information was in a database.

    Any suggestions?
    Thank you




    #left(mytext, 250) #.

    You may also want to strip all html out of var mytext tags in the order
    do not have CF cut in the middle of a tag and make it to the exit:

    #left (trim (rereplace (mytext, "<[^>] * >", "", "all")), 250).

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

  • Premiere Pro CC - effect audio Denoiser works is not on the first few seconds of the clip

    I use the audio Denoiser effect for the main audio track. When I export and play the video, the Denoiser effect is disabled for the first few seconds of the clip. I read on other forums that this can be corrected by putting the effect on the faucet of the audio track instead of each individual clip, but I already tried this and it does not solve the problem. Any ideas?

    audio denoiser appears to use the adaptive method by default. in other words, need a few seconds to look at the material to build a profile of noise and then start removing the noise. This is useful for when the noise pattern changes during recording. If you try to remove the noise is constant, you can open the effect and check the box 'freeze' to have keep the noise profile. This can make the effect kick in instantly vs seconds.

  • SQL query to get the first four characters of an address

    Hi gurus,


    Can you please help me with the below quries on how to achieve this. Could be really helpful if you could provide a sample sql on your side.


    Req:

    I have a requriement where I should display the first four characters other than a space to address, for example: becomes R, DISH etc. F. in passing in a ROOM address a DISH 1 FLORIAN AVENUE would therefore "RAF1", while a CORNER, 23 STREET address would be "23CO".


    Words such as c/o, co, rear should be ignored, if any.

    Thanks in advance.


    Kind regards

    Peoples

    Hi John,.

    Here is an implementation of a pl/sql function that suggested a franc. It uses two lists, one with the words which are replaced with the first character and a second with words to ignore.

    create or replace function first_four (p_input in varchar2) return varchar2 is

    type t_words is table of the varchar2 (100);

    p_replace t_words: = t_words ('ROOM', 'FIELD', 'FLAT', 'FLT', 'BLOCK', 'UNIT', 'STUDIOS', 'CARAVAN', 'APARTMENT');

    p_ignore t_words: = t_words ("C/o ', 'CO', 'BACK TO'");

    v_input varchar2 (100);

    Start

    -Put the entry in a local-variable he

    v_input: = upper (p_input);

    -delete the words contained in the ignore list

    because me in 1.p_ignore.count

    loop

    v_input: = replace (v_input, p_ignore (i));

    end loop;

    -Replace the words by first character in the replacement list

    for r in 1.p_replace.count

    loop

    v_input: = replace (v_input, p_replace (r), substr (p_replace (r), 1, 1));

    end loop;

    -remove the spaces and return only the first 4 characters

    Return substr (replace (v_input, ' '), 1, 4);

    end;

    /

    It returns the expected results for the four examples you gave:

    SQL > with t as)

    2 select address 'FLAT 3 a 12 LILLYHAM ROAD' of all the double union

    3 select ' GREE LANE GLOSONTH 45' across Union double

    4 Select "FLAT 3 221 b Baker Street," of all the double union

    5. Select "C/o CARAVAN 32 STREET BLOK 6 RICHMOOND' of the double)

    6. Select ff first_four (address) of t;

    FF

    --------------------------------------------------------------------------------

    F3A1

    45GR

    F322

    C32B

  • Remove the first 5 blocks in a data stream

    Hi all

    I have a problem to remove the first 5 blocks in the data stream. My sampling rate is 1 s, block size is 1 and the entrance is the module «the ddf file read»

    I use the following modules for an average analysis 30 years running.

    [read the folder]---> [Formule1] -> [set variable] -> [formula2]

    |                 ^

    --> [time]-|

    module parameter

    ======                =========

    delay of 30

    Formula1 ${var_1} + in (0) - in (1)

    the value of variable ${var_1}

    Formula2 in (0) / 30

    This configuration is used for channels 13 and one of these channels is used for purposes of triggering. Due to the nature of the variable defined and read in the underlinedmodules, the trigger sequence is delayed for 2 sec. Since I used the trigger to collect the last returns average of each channel, it is now mixed with 2 sec for the next round.

    My question is: is there a way to reduce say 5 blocks of data from the stream? Please help and have a nice day

    Look at the SEPARATE module in the Group of data reduction.

    It allows you to set up an initial leap, then a current break.

    To do this, you want to jump 5 blocks once, does through go zero blocks... who spends the first five and then release all the data blocks of subsequence.

  • Delete in af:table always remove the first line when using ExecuteWithParams

    Hello world

    I got a page with master form and af:table two details related to the master. When I'm trying to remove a line in an af:table of detail, it always removes the first line, any line, I selected before. The table has a single = rowSelection and the line is properly visually selected. I remove the line using a "delete hyperlink" on each line, but I first have to select the line. Delete called a bond (or a method at the bean by removing the current line of the iterator, I tried both, none of them work)

    Links page has an ExecuteWithParams defining the correct ID to edit on the master of iterator and an InvokeExecuteWithParams the renderModel value. If I put the refresh condition zero and I hard-code an ID in the binding variable in the model, I am able to delete the selected line.

    In addition, I don't know if this information is useful, but if I set the iterator to PPR ChangeEventPolicy, when I select a line, there always select the first line.

    Any ideas what I could do wrong? Is this a bug?

    I use JDev 11.1.1.7

    Thank you

    Guillaume

    You can try creating a method in ApplicationModule for filter master records instead of executeWithParams?

    Ashish

  • v$ fixed_view_definition where and ' GV$ SESSION "= only the first 4000 characters

    Hi all

    I need to get the defeintion of the opinion GV$ SESSION.

    I get only the first 4000 characters.

    Select * from v$ fixed_view_definition where view_name = "GV$ SESSION;

    Could you please help me?

    Thank you

    Cherif.

    Cherif bh wrote:

    Hi Martin,

    Thanks for your help. I use 11.2.0.3 and is EXPAND_SQL_TEXT added 12 c.

    I try to get the definition of a problem of performance on gv$ session; I need a list of the tables and columns and add the best predicates and access them using indices

    You should be able to get the same thing on 11.2.0.3 too:

    https://jonathanlewis.WordPress.com/2012/07/10/expanding-SQL/

    The package is called DBMS_SQL2 it.

    Randolf

  • Is there an action or a script to remove the variables?

    I have about 500 files created from a source model and a variable (of 500 sets of data). Each of the 500 output files includes the library of variables. I want to separate the object and remove the variable in each of these output files. It will take hours to open each file and manually remove the variable, so I hope that it might be possible to automate this process with a script or a batch action. Unfortunately, however, I don't know enough script to create the script myself. Are there commands that can be combined in an action, or y at - it an existing, to achieve this script?

    Thank you very much.

    Maybe that someone else can promote the use of 'actions' for this?

    About scripting:

    Give a try on a "test copy" of one of your files and see if it's what you want.

    function removeDataSetsAndVariables() {
        if (app.documents.length > 0) {
            var doc = app.activeDocument;
            var dS = doc.dataSets.length;
            var v = doc.variables.length;
            var curV;
            if (v > 0) {
                for (var i = v - 1; i >= 0; i--) {
                    curV = doc.variables[i];
                    curV.remove();
                }
            }
            if (dS > 0) {
                doc.dataSets.removeAll();
            }
        }
    }
    removeDataSetsAndVariables();
    

    In my quick test, the code snippet above will remove all the variables and data sets, is that what you need/want? If Yes, then we can proceed from there. Let us know.

  • GREP string to select the first 2 characters of an e-mail address

    I want o apply the formatting for the first two characters of an e-mail address:

    [email protected]

    the party @domain.com never changes so I can simply place in parentesis.

    So far I managed to isolate the word in front of the e-mail domain:

    \w+([email protected])

    I want to select only the first two characters of the word before the @domain.com

    any ideas?

    Thank you!

    No, sorry. Try this:

    \b[-\w]{2}(?=[-\w]+@domain\.com)

Maybe you are looking for

  • Apple TV Home Sharing very slow loading!

    Hi all If the thing is I want to listen to my films I have in iTunes on my Macbook Pro (late 2011) to my TV via my Apple TV! Home sharing is working I can see movies that I have on my Macbook Pro, but if I start to play the movies his load of 10-30 m

  • Satellite 3000-100: need new HARD drive

    Hello I am looking for a new HARD drive for my laptop. I've already tired 3 different (2xHiachi, 1xToshiba MK2023GAS) HARD drives, but the Bios (latest Version 2.40) could not detect them. Nobody knows that suits HARD drive? Thank you

  • Wmp54g freezes up to Vista when I install it

    Well, after two months of blame Dell for my pc problems, I finally realized what the Linksys pci adapter that is causing all the problems.  I had trouble with this gel upward on the Welcome screen or shortly there after.  Dell had me reinstall the OS

  • reset the taskbar at the bottom of the screen

    I accidentally moved my taskbar to the left.  I tried all the suggestions on how to reset to the initial position, but most of the answers are for Windows, Windows XP but not Vista.  Any help is appreciated.

  • Problems install "HP Deskjet F2200/F2224 all-in-One Printer series full feature software and driver.

    Printers: HP Deskjet F2280Operating system: Windows 8.1 Computer: Dell Insperion a 2330 When trying to install the full feature software & driver I confronted with the following problems: I downloaded the driver & software above ok The Installer star