How to change a 'Save as pdf script docs' to include the custom file name suffix

I am trying to add some efficiencies of larger projects buy reducing the number of steps needed to export to PDF. I want to add a custom chain file name.

YOU WANT

From:

20131006_KK_Brochure_v1.PDF

TO:

20131006_KK_Brochure_v1_OUTLINES_PRINT.PDF

However, I have problems with the code that I modified. The code below is the addition of "_OUTLINES_PRINT" as a prefix, rather than as a suffix.

function getTargetFile (docName, ext, destFolder) {}

newName = "_OUTLINES_PRINT"; var

If (docName.indexOf('.') < 0) {}

newName = docName + ext;

} else {}

var point = docName.lastIndexOf('.');

newName = docName.substring (0, dot);

newName += ext;

}

Any help would be appreciated.

Any help would be appreciated.

change this line

newName += docName.substring(0, dot);

for this

newName = docName.substring(0, dot)+newName;

Tags: Illustrator

Similar Questions

  • How do you keep Windows automatically passing the entire file name when editing?

    When I copy a file to a folder and rename the file, that I right click once on the file name to select it and again to place the cursor where I want to change the name in the name of the original file.  However, until I'm able to start typing the computer automatically highlights the entire file name, so that when I start typing deletes the original file name and replace it with what I typed.  Is there a way to avoid this and allow me to change the name of original rather than delete it and start from scratch?

    If I press ESC to restore the original name and follow the same steps again, that it allows me to change the name of the original file as you wish.  That is to say, I see only this product the first time I try to change the file name.

    After he highlights the entire name, press any cursor movement: home, end, left arrow, right arrow key.  Who will be development of the United Nations name and allow you to move the cursor in the right place to start to edit. Boulder computer Maven
    Most Microsoft Valuable Professional

  • I bought the ability to convert PDF files into word documents. However, when I opened a PDF it does not include the right panel that had been giving me the option to convert. After spending 30 minutes on a cat, I learned that (1) the option is not on the

    I bought the ability to convert PDF files into word documents. However, when I opened a PDF it does not include the right panel that had been giving me the option to convert. After spending 30 minutes on a cat, I've learned that (1) the option is not on the right side panel on Acrobat 9 Pro, (2) it is on the top. What should I do to convert my files?

    Look at the file menu.

  • How to recover the original file names?

    Hello! Please help me.


    Accidentally, I changed the names of the videos that I used for Adobe Premiere. So now, every time I open the folder Adobe Premiere, videos are missing and replaced with a red screen "media disconnected". Is there any way I can recover the original file names without having to do it manually one by one?


    I tried to go back to a restore point, but it does not work. I can't locate too because I don't remember which video is which.


    I already edited almost 50 videos in this project it would take me a loooot of time to start all over again. :((


    Hope you can help me.

    If I understand you correctly, you changed the name of the file in Windows and can't remember what used to be file names. You have modified these in Premiere Pro, and now the project files, that you created do not know where to find the video files.

    Is this correct?

    If so, I may have a simple solution for you.

    Assuming that you're not maxing out every file so that they are all exactly the same length, the number of minutes and seconds and images should get you where you want to go. Almost as unique as a fingerprint on my PC, but I never capture a bunch of videos which are identical in time - although it is possible to do, I guess.

    Open a project file. Checking the properties of each file should reveal the name of file theoriginal and duration, which is also available directly on the thumbnail image (see image below).  Open the media browser, then look at the times on each clip. This should be enough to help you either republish or change the Windows name to what it was originally. It's always one at a time, but it shouldn't take too long. A pen and paper could help 50 videos.

  • How to change or open a pdf file. Ext file using Photo Gallary

    Hello

    My download files are save in pdf. ext files.  I'm unable to open these files using Windows Photo Gallery.  I tried to modify the PDF. file to a jpeg file and it would allow me to change the file.  So, how can I change all my download files that I can't open a file with a file position I can't open?

    Thank you

    I do not know if you are aware that the pdf files are normally open with Adobe Reader and intentionally try to use another application?  If this isn't the case, if you download the free Adobe Reader application, you should be able to open PDFs just by double-clicking it.  The following link has the free download (note - suggest you uncheck the "Yes - install McAfee Security Plan more - optional" before download): http://get.adobe.com/reader/

  • How to change default save as type in ms paint?

    The default save as type in Ms Paint is .bmp. But I used save as .jpg. So every time I change the ext file when saving a file. I need to change the default save as .jpg type so that I can save time.

    Any help would be appreciated.

    In fact, is not the only solution is not the best option in my opinion.
    Try this:
    PAINT box open, and then click BLUE in the upper left corner of the screen (it's the box that gives the drop down options for saving a file), now click on SAVE AS and a selection of Save as formats including JPEG will appear to the right, move your cursor over the JPEG option and right CLICK (not left-click) , three options will be presented, click on option (selection) from the top that says add to QUICK ACCESS the FOLDER.
    This creates a new ICON at the top of paint next to the arrow and UNDO (icons).
    Now in the future when you want to save anything as JPEG just click on this new icon (instead of the blue drop-down list) and save the normal opens with DEFAULT JPEG.
    Take advantage of :)

  • How to open a pdf file in the custom file system browser?

    Hello experts

    Nice day

    My Forms/version BEING 10.1.2.3

    Operating system Windows server 2008r2 / 2012r2

    I want to open a PDF file of file system server (pdf file stored in the custom example path D:\folder1\folder_pdf\pdf_file.pdf ) in a web browser as we call / open a PDF reports by clicking a button.

    How can I achieve this?

    Thanks in advance.

    Ask2Learn

    Hello @ask2Learn

    Follow

    1 web.show_document virtual directory. Oracle Community

    2 view the web document does not... | Oracle Community

    Hope this helps

    Hamid

  • Acrobat Pro DC just installed, but cannot save a PDF at all - except that the screen is blank

    I just installed Acrobat Pro DC on my work computer and my ' Save as ' and 'Save' functions do not work.  Save as screen is empty and save made up a dialog saying that he cannot save any file (various reasons according to the file).

    I tried to repair the installation, then tried/re-installing but nothing has changed.  Help!

    Try this: go to the menu, then Preferences, then click the general tab, on the left. On the right, uncheck the radio button 'Show online storage in check'. Press OK in the Preferences dialog box, and then try to save again. The problem goes away?

  • How Config Network Service by script? for example the response file

    I created a batch for DB creation using DBCA silent.

    I want to add a script to create also the Networking Service after.

    I was told that it can be done with the answer file.

    Is a response file script also which can be run after the DBCA scripts?

    Where can I find a manual with the available commands so I can produce what I need?

    On the internet, I don't find as silent examples of the DB instalation.

    EDIT

    Operating system is Windows 7 Oracle 11.2.0.1

    I want to create the Network Service that will add these lines to the tsnames.ora.

    DBNAME =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = wsName) (PORT = 1521))

    (CONNECT_DATA =

    (SERVICE_NAME = dbname)

    )

    )

    on the client and the server.
    How can I automatically via a batch script, to add it to the DBCA scripts after creation?

    I was told once to atopic that this could be done via a response file.

    I provided the Correct found answer on this subject since then.

    The 1st solution to set up a NetService via a custom command script, adding the data you need as if it was a BAD IDEA.

    1. you can not guranaty the correct paths if you plan the planting in an API with a lot of end users.

    2. the 1st time, you set up a network service, it must be set to cause netca (network Assistant) 1st the tnsnames.ora is not exiswt at all.

    THE OFFICIAL is to run from a shell in silent mode netca and feed it with values from a response file, either online as parameters

    I copy paste the solution I wrote on a separate thread

    https://forums.Oracle.com/thread/2559659

    The scenario is to set up a typical network Service without using the interface graphics, but instantly with a command from the shell.

    Scenario took place on Oracle 11.2 g on Windows 7

    Level of Description: Noob

    1. you can open of Network Setup Wizard, of the hull directly by entering its name "netca.

    Info: netca is an actaully of batch file calling several "elements". Located in the \bin folder of the directory of Instalation Oracle (Client and server time)

    the patrh of the \bin folder, where is the netca is included in the widnows PATH environment variable. So when you enter netca there and run it.
               https://en.Wikipedia.org/wiki/path _ (variable)

    ATTENTION: If you have the path of the directory before the path of the Client Server, the server netca will run instead

    2. on a typical NetService we re Protocol, host, Port, DatabaseName and the name of the service itself to identify it.

    -Silent option along a response file gives the possibility of is not interact at all with the GUI as all values will be filled with the answer file that will point us

    3. you can find an example of response file to the ORACLE_HOME\inventory\response\ called netca.rsp. It contains all the possible parameters, you can pass, so that you can choose that you need.

    For our scenario, the final answer file will look like this.

    [oracle.net.ca]

    INSTALL_TYPE = ""custom"

    NAMING_METHODS = {"TNSNAMES"}

    NSN_NUMBER = 1

    NSN_NAMES = {'DBNAME'}

    NSN_SERVICE = {'testII"}

    NSN_PROTOCOLS = {'TCP; PCNAME; 1521 "}

    So now you simply enter netca responsefile option along the pat of the answer file with the silent command to power entry

    NETCA/Silent /responsefile /C:\oracle\product\11.2.0\dbhome_1\inventory\response\mynetca.rsp

    So simple

  • I would like to use windows live messenger to save pieces of spoken word and include the words scrolling. How do I do that?

    I came across a video that was shared on Facebook via Windows Live Messenger. The video was a piece of Word with the lyrics scrolling. I would like to know how to use this function for me.

    Hello

    The question you have posted is related to Windows Live and would be better suited to the Windows Live community. Please visit the link below to find a community that will support what ask you

    http://www.windowslivehelp.com/product.aspx?ProductID=2

  • How to change a photo that has been edited from Photoshop Elements psd file in a jpeg file and always keep "layers" or RGB functions that were suppose to be included and automatic with this program.

    When I try to 'save' the photo, I get a warning popup, saying only save as copy, as jpeg will not support the "layers".  The site that I want to download my photos requires jpeg only, but it must have space color Adobe RGB or sRGB...

    suezans89729982 wrote:

    When I try to 'save' the photo, I get a warning popup, saying only save as copy, as jpeg will not support the "layers".  The site that I want to download my photos requires jpeg only, but it must have space color Adobe RGB or sRGB...

    Your thread earlier today deals with the question of the layers, the JPEG file format is not supported. If you want to save the file with layers, save as PSD. To load the referenced site, save the file in JPEG format as well. After you have downloaded, remove the JPEG file if you are short of space.

    Go to Image > mode and make sure the RGB color is checked. When you go to file > save as, in JPEG, the ICC profile is sRGB IE C61966 - 2.1 (on my current test file).

  • combine file name suffix "save under".

    I have 600x600px file named "ABC". I want to save this file in three versions in 1 folder which different folder to the original:

    ver1 600x600px name ABC_1 in JPEG

    Ver2 300x300px name ABC_2 in PSD

    name of 300x300px ver 3 ABC_3 in JPEG format.

    I can do this with the command save slot, but can not add the suffix.  I can add the suffix with a script, but I don't know how to create a user interface to choose the file type and the address of the file as we do with Save as. Thanks to advanced using your script.

    If all goes well, I understand now.  You want to edit in each compact version.  If so here is what you can do.  You will need to create three scripts that you can then run your action.  They are all based on the same script, but it will be a few minor changes.  The script that I write below a still the user interface dialog box, but I think you want to delete this part (the stretch between the lines "/ / /" and just edit line 6 by putting in the exact path you want to use to save your images.)

    This is the first script and the base for others:

    #target photoshop

    app.displayDialogs = DialogModes.NO;

    app.preferences.rulerUnits = Units.PIXELS;

    var file = new File();

    var saveFolder = new folder ('/ c /'); Exchange for which you want to save.

    var docRef;

    var jpgOptions = new JPEGSaveOptions();

    jpgOptions.quality = 10;

    var psdOptions = new PhotoshopSaveOptions();

    psdOptions.layers = true;

    ///////////////////////////////////////////////////////

    var Dlg is new window ("dialog", "Images of process");.

    dlg.folderGp = dlg.add ('group');

    dlg.folderGp.sTxt = dlg.folderGp.add ("statictext', undefined, 'Save file');

    dlg.folderGp.btn = dlg.folderGp.add ('button', undefined, saveFolder.fsName);

    dlg.folderGp.btn.size = [500,20];

    dlg.folderGp.btn.onClick = function() {}

    saveFolder = Folder.selectDialog ("select a backup folder")

    dlg.folderGp.btn.text = saveFolder.fsName};

    dlg.btnGp = dlg.add ('group');

    dlg.btnGp.okay = dlg.btnGp.add ('button', undefined, 'Okay');

    dlg.btnGp.cancel = dlg.btnGp.add ('button', undefined, 'Cancel');

    dlg.btnGp.okay.onClick = function() {}

    if(!saveFolder.Exists) {alert (' save selected folder does not exist.)} ")}

    else {}

    DLG. Close()

    runProg()}

    }

    dlg.btnGp.cancel.onClick = function() {}

    DLG. Close()};

    DLG. Show();

    //////////////////////////////////////////////////////////////

    f

    anointing runProg () {}

    docRef = activeDocument

    var fileName = docRef.name.split('.') [0] ;

    var docSize = Math.max (docRef.width, docRef.height)

    if(DocRef.Width>DocRef.Height) {docRef.resizeImage (600, defined, undefined)}

    else {DocRef.ResizeImage (undefined, 600, undefined)}

    docRef.saveAs (new file (saveFolder + ' /' + name + '_1.jpg'), jpgOptions);

    /*

    if(DocRef.Width>DocRef.Height) {docRef.resizeImage (300, defined, undefined)}

    else {DocRef.ResizeImage (undefined, 300, undefined)}

    docRef.saveAs (new file (saveFolder + ' /' + name + '_2.psd'), psdOptions);

    docRef.saveAs (new file (saveFolder + ' /' + name + '_3.jpg'), jpgOptions);

    */

    }

    for the second script change the ending of the first script to this:

    function runProg () {}

    docRef = activeDocument

    var fileName = docRef.name.split('.') [0] ;

    var docSize = Math.max (docRef.width, docRef.height)

    if(DocRef.Width>DocRef.Height) {docRef.resizeImage (300, defined, undefined)}

    else {DocRef.ResizeImage (undefined, 300, undefined)}

    docRef.saveAs (new file (saveFolder + ' /' + name + '_2.psd'), psdOptions);

    }

    For the last script change the ending to this:

    function runProg () {}

    docRef = activeDocument

    var fileName = docRef.name.split('.') [0] ;

    var docSize = Math.max (docRef.width, docRef.height)

    if(DocRef.Width>DocRef.Height) {docRef.resizeImage (300, defined, undefined)}

    else {DocRef.ResizeImage (undefined, 300, undefined)}

    docRef.saveAs (new file (saveFolder + ' /' + name + '_3.jpg'), jpgOptions);

    }

  • Take the incorrect file name in a script file

    Hello

    I want to write code to catch only in the name of the file at the end.

    I tried to write my script like this:

    #target photoshop

    var myInputFolder = Folder.selectDialog ('INPUT');

    {if(myInputFolder!=null)}

    myFiles = myInputFolder.getFiles var (/ \.) (jpg) | PSD | TIF | PNG | (gif) / $i);

    for (var fileIndex = 0; fileIndex < myFiles.length; ++ fileIndex)

    {

    var currentFile = myFiles [fileIndex];

    If (CurrentFile instanceof file)

    {

    If (CurrentFile.Hidden) continue;

    var doc = app.open (currentFile);

    myDoc = doc.name;

    value = myDoc.slice (8, -4);

    If (value! = 10)

    {

    Alert ("file naming conversion must be-10");

    }

    Here, I want to write code more

    }

    }

    }

    Here, I want to write that if the value is between 10 and 19 (for example, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) the code should ignore the alert. How to write code.

    Thanks in advance,

    12345664.JPG

    Mohamed S. N

    Here is a small script that will get just the file name numbers after the dash and change it to a number:

    #target photoshop
    
    var fileName = 'abcde-01.jpg'
    var fileNameNoExt = fileName.split('.')[0];
    var dashIndex = fileNameNoExt.split('-');
    var imageNum = Number(fileNameNoExt.split('-')[dashIndex.length-1])
    alert(imageNum)
    
  • How to include the .php file in .shtml using SSI

    Hello

    I just finished with my "Contact Us form" for my site and have some problems with running it. I have a .shtml file in which I would include a contact form join us file http://mydomain.com/includes/ContactUs.php http://mydomain.com/contact-us.shtml . Now, saw my web page "Contact us" as a file *.shtml with ContactUs.php file included, I can run the form but I can't send emails.  If I change contact - us.shtml contact - us.php form runs perfect but I can not use other includes on this file as a logo, header, footer etc. How I could include a .php file in a .shtml file and runing time the .php script included and understandably?

    Thank you!

    Keep things simple.

    Your html file using a syntax such as " [an error occurred while processing the directive] " to include an SSI file. Your server requires either (1) that the html file will have the extension .shtml or (2) you turn with a .htaccess file to force the server to scan all files html for SSIs. This is generally not a good idea.

    PHP files are already processed on the server. Integrate SSI the same way files, but the syntax is a bit different: " ". ""

  • do action of photoshop which saves the file with the specific file name

    Is there a way to make a photoshop action that makes a SaveForWeb, but adds text in the name of the original file when recording?

    By example, if I open a file called "guard page", and I want the action of making SaveForWeb in JPEG format, can I save as "coverPageWEBVERSION"?

    Thank you for your time and help

    No it's something, for that you will need for scripting.

    They really should introduced some changes to the dialog box Save that allows additions or of the changes can be triggered again in the actions of file naming. But they never have.

    As a solution, bridge is a good tool to rename, because there is naming can be SAVED and quickly applied to groups of files. Done - on a mac it is not often known are also the scripts OS can do the same thing. There is a script called "rename the items' hidden somewhere. It is accessible through the control or right-click on a group of files and going through the submenu "automate".

Maybe you are looking for