I need to save the file add 3 sequence of digits almost I'm done but I need help

Hi all

Almost, I finished this script but I need three digit sequence only

But now he saved single digits only

When I run more than 100 files in a single batch

I need to save FileName_001.Extension

FileName_011.Extension

FileName_101.Extension

FileName_111.Extension

FileName_999.Extension

Now he saved only single-digit

Please correct

activate the double click from the Macintosh Finder or Windows Explorer

#target photoshop

gFilesToSkip = Array ("db", "xmp", "thm", 'txt', 'doc', 'md0', "tb0", "adobebridgedb", "adobebridgedbt", "bc", "bct");

var inputFolder is Folder.selectDialog ("select a folder of documents to process");.

OpenFolder();

function {OpenFolder()

var filesOpened = 0;

List of files of the var = inputFolder.getFiles ();

for (var i = 0; i < fileList.length; i ++) {}

If (instanceof file in the list of files [i] & &! .hidden fileList [i] & &!) IsFileOneOfThese (list of files [i], gFilesToSkip)) {}

Open (fileList [i]);

filesOpened ++;

var docPath = createFolder ("~/Desktop/EPS");

suffix var = "_";

var fileName = activeDocument.name.match (/(.*)-.) [ ^\.] +$/)[1];

var epsFile = new queue (docPath + "/" + fileName + suffix + [i] + '.eps');

var doc = app.activeDocument;

epsSaveOptions = new EPSSaveOptions()

epsSaveOptions.embedColorProfile = true

epsSaveOptions.encoding = SaveEncoding.JPEGMAXIMUM

app.activeDocument.saveAs (epsFile, EPSSaveOptions, true, Extension.LOWERCASE)

app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);

}

}

Return filesOpened;

}

function IsFileOneOfThese (inFileName, inArrayOfFileExtensions) {}

var lastDot = inFileName.toString () .lastIndexOf ('. ');

If (lastDot ==-1) {}

Returns false;

}

var strLength = inFileName.toString () .length;

var extension = inFileName.toString () .substr (lastDot + 1, strLength - lastDot);

extension = extension.toLowerCase ();

for (var i = 0; i < inArrayOfFileExtensions.length; i ++) {}

If (extension == inArrayOfFileExtensions [i]) {}

Returns true;

}

}

Returns false;

}

function createFolder (path) {}

Var folder = Folder (path);

If (theFolder.exists == false) {theFolder.create ()};

Return (theFolder)

};

Hi Sasi,

Here's the corrected code...

-yajiv

activate the double click from the Macintosh Finder or Windows Explorer

#target photoshop

gFilesToSkip = Array ("db", "xmp", "thm", 'txt', 'doc', 'md0', "tb0", "adobebridgedb", "adobebridgedbt", "bc", "bct");

var inputFolder is Folder.selectDialog ("select a folder of documents to process");.

OpenFolder();

function {OpenFolder()

var filesOpened = 0;

List of files of the var = inputFolder.getFiles ();

for (var i = 1; i)< filelist.length;="" i++="" )="">

If (instanceof fileList [i] file &! .hidden fileList [i] &!) IsFileOneOfThese (list of files [i], gFilesToSkip)) {}

Open (fileList [i]);

filesOpened ++;

var docPath = createFolder ("~/Desktop/EPS");

suffix var = "_";

var fileName = activeDocument.name.match (/(.*)-.) [ ^\.] +$/)[1];

If (I > 0 & I)<>

var epsFile = new queue (docPath + "/"+ fileName + suffix +"00" + [i] + '.eps');

}

If (I > 9 & I)<>

var epsFile = new queue (docPath + "/"+ fileName + suffix +"0" + [i] + '.eps');

}

{if(i>99)}

var epsFile = new queue (docPath + "/" + fileName + suffix + [i] + '.eps');

}

var doc = app.activeDocument;

epsSaveOptions = new EPSSaveOptions()

epsSaveOptions.embedColorProfile = true

epsSaveOptions.encoding = SaveEncoding.JPEGMAXIMUM

app.activeDocument.saveAs (epsFile, EPSSaveOptions, true, Extension.LOWERCASE)

app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);

}

}

Return filesOpened;

}

function IsFileOneOfThese (inFileName, inArrayOfFileExtensions) {}

var lastDot = inFileName.toString () .lastIndexOf ('. ');

If (lastDot ==-1) {}

Returns false;

}

var strLength = inFileName.toString () .length;

var extension = inFileName.toString () .substr (lastDot + 1, strLength - lastDot);

extension = extension.toLowerCase ();

for (var i = 0; i)< inarrayoffileextensions.length;="" i++="" )="">

If (extension == inArrayOfFileExtensions [i]) {}

Returns true;

}

}

Returns false;

}

function createFolder (path) {}

Var folder = Folder (path);

If (theFolder.exists == false) {theFolder.create ()};

Return (theFolder)

};

Tags: Photoshop

Similar Questions

  • My photoshop only save the file to copy. What should do? I need JPEG or JPG

    My photoshop only save the file to copy. What should do? I need JPEG or JPG

    You have probably some layers other than just a background, or you have certain paths or additional channels. Make sure you flatten the image and delete all channels and additional paths.

  • In windows mode 8, when I need to save a file (photo), I can't make a new folder to save the file.

    In windows mode 8, using Hotmail app, I don't have the opportunity to make a new folder to save an attached file in an email.

    Hi Lince,

    Please answer this question to get more clarity on this issue.

    -You talk to the Mail app?

    If you are referring to the Mail application, then by saving an attachment of an e-mail can be done in a folder on the computer. So, if you want to create a new folder to save the file attachment, you must create it before you download the attachment of the e-mail.

    Response with the State of the question and we will be happy to offer you our help.

  • Cs6 save the file for the printer company

    Question on master Parent AI file, or art presented in another file I send to the printer?

    I created a leaflet (2.83x11) that I can now add 3 to a sheet of 8.5 x 11 for 3 leaflets per leaf.  When I save the master flyer (the 2.83x11), I crushed my text in text outlines to 1200 dpi and rasterized my art at 400 DPi and then saved the file. Ok

    Then I open a new Board art 8.625 x 11.13 (to bleed) printing on the edge (border less) then place my Flyer 3 times on my plan of work and when I'm going to save this option to send to the printer here in lies my question (s)

    1. when I record a new workplan with a related Parent file this related info will save the file so that when my (printer) opens this file I. I bring the file Parent bound with it too on my USB key? Or the artboard will save all the contours and raster art on 8.65x11 the work plan?

    Take me to a second question

    2. when I go to save this new artboard flyer and 8.5 x 11. I'm asked or warned of 72 dpi rasterization of the newly placed flyer to be saved and then placed in the 1200 and 400 dpi in as mentioned above. But I think I should go effect > rasterize > high or other (fill in PPP)

    Here's the question if I save which place Parent, or the linked file and then rasterize, choosing 1200 as is the text of the first file is saved, it errors and says big enough to rasterize the 1200 dpi.  IF I rasterize say 400 dpi does now that sharp text I saved in the Parent bound 1200 file?   In other words how save you this file as it is stored in the master or the parent Flyer when you place it on a work plan for a printer?

    CS6 AI not cloud.

    Here's what I do.  I would like to see the screenshots of the dialog where you are notified to rasterize.  But, that aside except (ad I will continue when I have more time), the text in the presentation are vector curves.  No need to convert to text converted to outlines.  Leave the direct text, unless the printer ask contours.  When you generate the PDF file, the text becomes incorporated.  Resolution is located in the "exit".  You set the resolution of pixelation in Illustrator, if you applied some type of effects of rasterization (such as shadows).  It is, as far as I know, a maximum of 300 PPI in pixelation effects.  In General, when using a CTP (computer-to-plate) pre-press, a 5080dpi output resolution is common to generate a point as thin as 150 lines per inch.  Now get you to a point where you can understand the fundamentals and they understand no pixelation.  No deer at the level of the sender.

  • where to save the files under options the file name is duplicated how to remove an additional folder with the same name

    Under Options in Firefox, I clicked on save the files under downloads, but the file name twice and an additional file with the same name is created in the folder, i.e.:

    G:\Akbar's Songs\HAMARA DOWNLOADS\HAMARA FORUMS DOWNLOADS FORUMS

    As you can see the file repeats, how can I fix it?

    Also the music files, I download from a site of downloads as a WinRar file and I need to open it. Y at - it an option where the file opens automatically in the folder I chose?

    Thanks a lot for your help.

    Hi Akush, when you install 7 - zip, make itself the default application to open .zip and .rar files. So if you double click on the .rar file, it should open in 7 - zip. If you prefer to decompress immediately, right click the file and look for new 7 - zip items in the menu. I can't think of a way to do this automatically, however.

  • Where Cookies-Exceptions are stored so that I can save the file?

    I have access to my computer using 'Accept cookies from sites' - 'Exceptions'.

    Whenever I have reinstall FireFox, I have to manually add the sites one by one to this list of exceptions.

    If I knew what file these exceptions were stored in, I could save the file and do not have to recreate them each time.

    Thank you.

    All permissions except password exceptions are stored in permissions.sqlite in the Firefox profile folder

    The permissions.sqlite file stores exceptions allow and block for cookies, images, pop - up windows and installation of the extensions (software).

  • Save the file automatically in a default folder

    Hello

    I have a problem with the selection of a default directory to save the file (write on the worksheet). I want WriteToSpreadsheet automatically as a NEW FILE without inviting the user to click on the Ok button every time on "save file as" dialog box.

    Please find the attached photo to find the code.

    Analogy: I just want the program automatically save the file with a new file name each loop without pop up a dialog to the user to confirm the action.

    Thank you!

    Aerts

    Well, you already have the constant where he must go by default data.  You can just use it.

    Another option would be to create a Subvi to only call the file dialog box when the first call and record the path of the folder in feedback.  Then the selected folder has only one in need first.

    Probably the best option would be to have the user to select the folder where the program for the first time and this way through the while loop.

  • How to incorporate the timestamp and file name automatically select and save the file dialog?

    Hello

    I try to incorporate the name of the file that is the registration of the end user with the timestamp in the selected and save file dialog box. Can you help me?

    Thank you

    Hi Mike227,

    I couldn't find a way to immediately make the bat. I guess you need to mess with ActiveX to do. I found an msdn page that could help with this.

    Have you considered simply concatenating the name of the file and the time stamp with a path of the file and save the file when you create it, without inviting the user?

  • I was working on a doc Excel, open from my email account, I forgot to save the file on my desktop

    I was working on a doc Excel, open from my email account, I forgot to save the file on my desktop where the original file was. I kept while I was working, so where my file went?  saved on my profile Inbox or where?  Please I need for my work, tonight.  Help!

    Hi MelanieCline-Thera,

    Please take a look at a similar thread (substitute just Word for Excel):

    http://answers.Microsoft.com/en-us/Office/Forum/officeversion_other-word/lost-a-saved-file-that-i-worked-on-from-an-email/a07f5d65-2473-49C2-a6c3-64942d75662f

  • After a download program, I can't save the file. He said do not have the authorization

    After downloading a program window appears and tells SAVE or cancel. I click SAVE, but I get a message saying that I don't have permision. So the file is lost. I need help to save the files.

    Hello

    You can try the steps in the link below to fix the problem.

    How to set, view, change, or remove special permissions for files and folders in Windows XP

    http://support.Microsoft.com/kb/308419

    How to share and set permissions for folders and files using Windows XP

    http://TechNet.Microsoft.com/en-us/library/bb456988.aspx

  • Cannot save the file (OS6)

    UPDATE: just found out that documentToBlob is compatible with the OS5. How to do the same thing in OS6?

    http://www.BlackBerry.com/developers/docs/WebWorks/API/BlackBerry.utils.html#.documentToBlob

    I wrote an application several months ago, which works very well with the OS5. But it does not work with OS6. Here is a simple example of creating a file, the application needs to do:

    config. XML

    
        http://www.w3.org/ns/widgets"
            xmlns:rim="http://www.blackberry.com/ns/widgets"
            rim:header="RIM-Widget:rim/widget"
            version="1.0.0">
         File Test
        Testing file
         http://www.example.com/" rim:copyright="no copyright" email="[email protected]">Example
         
         
         
         
         
         
         
        
        
    
    

    test.html

    
    
        Test
        
        
    
    
        testing
    
    
    

    scripts/test.js

    function loadTest(){
        alert("start");
        var filePath = "file:///store/home/user/appTest.xml";
        var xmlString = "test_data";
        var parser = new DOMParser();
        var doc = parser.parseFromString(xmlString, "text/xml");
        try{
            var blobData = blackberry.utils.documentToBlob(doc);
            blackberry.io.file.saveFile(filePath, blobData);
            alert("file saved");
        } catch(e) {
            alert("unable to save file: "+e.message);
        }
        if(blackberry.io.file.exists(filePath))
            alert("file exists");
        else
            alert("file cannot be found");
        alert("end");
    }
    

    Output of Simulator OS6 (6.0.0.337):

    • Star
    • Cannot save the file: undefined
    • file cannot be raised
    • en

    No idea why it does not work

    I couldn't find a solution to this, nor could anyone help. I had to rewrite my application to store data in a database instead of an XML file.

  • Save the file with the same name

    How to change the script to save the file with the same name?


    
    
    
    
    //SaveforWebSP.jsx  
    
    
    
    //Save a fixed width image with a size constraint in its original folder  
    
    
     
     
    
    
    
    var docRef = activeDocument;  
    
    
    
    var outputFolder = docRef.path;  
    
    
     
     
    
    
    
    NamesaveRef = new File( outputFolder + "/reference.jpg" );  
    
    
    
    var NewfileRef = new File( NamesaveRef )  
    
    
     
     
    
    
    
    // quality/size constraints  
    
    
    
    var w = 1920; // new file width  
    
    
    
    var MaxSz =  361440; // max. 360Kb  
    
    
    
    var Qlt = 100; // initial quality 100  
    
    
    
    var x = 1; // decreasing step  
    
    
     
     
    
    
    
    // resize the image to the right width  
    
    
    
    docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER);  
    
    
     
     
    
    
    
    // Perform the first SaveForWeb Operation  
    
    
    
    ExpWeb(NewfileRef, Qlt);  
    
    
     
     
    
    
    
    // Keep trying to save the file with max. Qlt, but under MaxSz 
     
    
    
    
    while (NewfileRef.length > MaxSz)  
    
    
    
    {  
    
    
          
    Qlt = Qlt - x;  
    
    
          
    NewfileRef = new File( NewfileRef );
     
    
    
          
    NewfileRef.remove();  
    
    
          
    ExpWeb(NewfileRef, Qlt);  // Perform a new SaveForWeb Operation, with slightly lower Qlt  
    
    
             
    if (Qlt <= 40) {  
    
    
               
    alert("The file can't be saved with the desired size AND quality.");  
    
    
               
    break  // break the loop whenever the quality is as low as 50 (this shouldn't need to happen)  
    
    
             
    }  
    
    
    
    }  
    
    
     
     
    
    
    
    var FileSz = NewfileRef.length/1024;  
    
    
    
    FileSz = Math.round(FileSz);  
    
    
     
     
    
    
    
    // close the original file without saving  
    
    
    
    activeDocument.close(SaveOptions.DONOTSAVECHANGES);  
    
    
     
     
    
    
    
    // SaveForWeb Export, with the desired constraints and parameters  
    
    
    
    function ExpWeb(FileNm, Qlt)  
    
    
    
    {  
    
    
          
    var options = new ExportOptionsSaveForWeb();  
    
    
          
    options.quality = Qlt;   // Start with highest quality (biggest file).  
    
    
          
    options.format = SaveDocumentType.JPEG;   // Save Format for the file  
    
    
          
    docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options);  
    
    
    
    } 
    
    
    
    
    

    Change of line 25 to:

     var docName = docRef.name.split('.')[0];
     NamesaveRef = new File( outputFolder + "/"+docName +".jpg");
    
  • Illustrator CS6 mode does not respond when you save the file

    Hello

    For the past two weeks Illustrator switch mode not responding whenever I want to save a file. He stays like that for all 30secs and then he finally saves the file / changes / updates.

    I use Adobe CS6 Design & Web Premium edition for Windows.

    I have uninstall and install the software several times but nothing seems to work.

    Any help will be appreciated.

    Manual,

    Just to be sure: is there a printer correctly installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper)?

  • When you save the file GIF grace to save for Web how can I save the original?

    Hello.

    When you save the file GIF grace to save for Web how can I save the original?

    I need the original and not optimized.  Help, please

    ilyag58620179 wrote:

    But I need to GiF animation file

    And by definition, a GIF image is optimized! A GIF is not the same size of the PSD file, and you are mistaken in thinking that you want it to be. If you are trying to achieve the slightest loss of quality, regardless of the size of the file, then you need to adjust your settings to save for Web.

  • Save the file with the annotation and highlighting

    Hello world

    I used to save the file with the annotation and emphasize locally.

    With the new update: Version 2015.009.20079, I'm not able to do as much as Adobe does not have the location of the local file.

    Why is it like that? Is there a setting that is required to restore the previous behavior of the program?

    Concerning

    Mohammed

    Hi Mohammed,.

    In this case you may need to check the configuration of this application settings or set Acrobat Reader preferences.

    Thank you

    Abhishek

Maybe you are looking for

  • my browser.newtab.url keeps returning to the time where I change it

    I want to open my new tabs as my homepage to google, but when I change the browser.newtab.url on www.google.com , it comes back to what it was before every time I close firefox.Can someone help me?

  • HP Pavilion: Bluetooth doesn´t work after installing Windows 10

    Hello Doesn´t Bluetooth work after I upgraded my OS to Windows 10. Can someone help me please? JimWieder

  • L10-202: Modem: default gateway server error

    I have a new L10-202. It came with XP Home and I reformatted the drive and installed XP Pro and reinstalled Toshiba Utilities. I installed a Linksys wireless router and a linksys Pmica card. The wireless connection is good and if I connect the router

  • HP ENVY 15 - j028tx: HP ENVY 15 (windows 10) fingerprint problem

    I have upgraded to windows 10 and the fingerprint driver no longer works. I decided to install the new driver on the site of hp drivers and after the installation of the new driver, it shows a symbol yeow in Device Manager and still does not work. my

  • Sicherheitsupdate KB980232

    Installation of the Sicherheitsupdates KB980232 ist nach're nicht mehr possible Office 2007 Dateien mit "Speichern unter" auf einem Serverlaufwerk zu speichern. Speicher auf der local Fliegengitter ist kein problem. Copying einer Datei auf ein Server