Save the file multiple times

I am sorry for my English!
Illustrator CS5
It is necessary for me to keep an AI-file some times in certain folders, plus to keep and EPS.
The first preservation goes normally, that is I open a file and I start a script, the file remains on the specified way and with the name changed by me.
The code of the first saving:
      var currentMainDoc = app.activeDocument;
      var currentDoc = app.activeDocument.name;
      var fullPath = app.activeDocument.path;
      // We decode a way of the active document and it is replaced it with the necessary
      var fullNewPath = Folder.decode(fullPath);
      fullNewPath = fullNewPath.replace(drawFolder,expandFolder);
      // We check directory existence on a new way if isn't present, we create it
      var newFolderExpand = new Folder(fullNewPath);
           if (!newFolderExpand.exists) { newFolderExpand.create();    }
      // We collect new file name on a new way with adding to suffix file name _exp and we create a file
      var currentNewDoc = currentDoc;
      currentNewDoc = fullNewPath+"/"+currentNewDoc.replace(".ai","_"+sfx_exp+".ai  ");
      var newDocExp = new File(currentNewDoc);
      // We form saving options
      var saveExpOptions = new IllustratorSaveOptions();
      saveExpOptions.compatibility = Compatibility.ILLUSTRATOR15;
      // We save a file under a new name
      app.activeDocument.saveAs(newDocExp,saveExpOptions  );
After that I try to save already new active file in EPS (Options of saving EPS I do not write that there is less than code):
     var currentEps10Doc = currentMainDoc.name;
      // We collect new file name on a new way with adding to suffix file name _e10 and we create a file
      currentEps10Doc = tmpFolder+"/"+currentEps10Doc.replace("_exp.ai","_"+sfx_e10+".  eps");
      var newDocEps10 = new File(currentEps10Doc);
      // We save a file under a new name
      var  saveEps10Opts = getEps10Options();
      currentMainDoc.saveAs(newDocEps10, saveEps10Opts);
Doesn't save, because at creation var newDocEps10 = new File (currentEps10Doc); permanently in the beginning the way is added
/c/Program%20Files/Adobe/Adobe%20Illustrator%20CS5/Support%20Files/Contents/Windows/,
that is the full path turns out:
/c/Program%20Files/Adobe/Adobe%20Illustrator%20CS5/Support%20Files/Contents/Windows/c/medi a_files/vector/vector_tmp/primer_e10.eps
The most interesting that at creation var newDocEps10 = new File (); the following also turns out:
/c/Program%20Files/Adobe/Adobe%20Illustrator%20CS5/Support%20Files/Contents/Windows/tmp000 00002
And if it is necessary to address to any file and you create var aaa = File (SomeFile); the first way always is present at the beginning.
How to solve a problem?
Thanks!!!

Hi, it works ok here (with a few modifications).
Do you have the variable "tmpFolder" defined somewhere else? or you're trying to save the EPS in the default temporary folder?.
In Windows 7 the default temp folder is here C:\Users\carlos\AppData\Local\Temp
what's your first language?
var currentMainDoc = app.activeDocument;
      var currentDoc = app.activeDocument.name;
      var fullPath = app.activeDocument.path;
      // We decode a way of the active document and it is replaced it with the necessary
      var fullNewPath = Folder.decode(fullPath);
      fullNewPath = fullNewPath.replace("drawFolder","expandFolder"); // I created these folders myself
      // We check directory existence on a new way if isn't present, we create it
      var newFolderExpand = new Folder(fullNewPath);
           if (!newFolderExpand.exists) { newFolderExpand.create();    }
      // We collect new file name on a new way with adding to suffix file name _exp and we create a file
      var currentNewDoc = currentDoc;
      currentNewDoc = fullNewPath+"/"+currentNewDoc.replace(".ai","_"+"sfx_exp"+".ai  ");
      var newDocExp = new File(currentNewDoc);
      // We form saving options
      var saveExpOptions = new IllustratorSaveOptions();
      saveExpOptions.compatibility = Compatibility.ILLUSTRATOR14;
      // We save a file under a new name
      app.activeDocument.saveAs(newDocExp,saveExpOptions  );
//After that I try to save already new active file in EPS (Options of saving EPS I do not write that there is less than code):
     tmpFolder = Folder.temp; //fullNewPath; // I added this line
      var currentEps10Doc = currentMainDoc.name;
      // We collect new file name on a new way with adding to suffix file name _e10 and we create a file
      currentEps10Doc = tmpFolder+"/"+currentEps10Doc.replace("_exp.ai","_"+"sfx_e10"+".eps");
      var newDocEps10 = new File(currentEps10Doc);
      // We save a file under a new name
      var  saveEps10Opts = new EPSSaveOptions(); // getEps10Options();
       currentMainDoc.saveAs(newDocEps10, saveEps10Opts);

Similar Messages

  • Can I choose where to save the files every time?

    When I get files by email, it's very annoying they all get saved in the same place. I'd like the chance to decide, every time, where I want them to be downloaded to, so that I don't have to be moving them around or reorganizing them later.
    Also, is there an option to just open the file instead of downloading it? Some times I just want to see the content of the file, not necessarily save it in my computer.
    Thanks!

    In case you are using "Clear history when Firefox closes":
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-browsing-search-and-download-history
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception that you would like to keep.
    You can inspect and manage the permissions for the domain in the currently selected tab via these steps:
    *Click the "[[Site Identity Button|Site Identity Button]]" (globe/padlock) on the location bar
    *Click "More Information" to open "Tools > Page Info" with the Security tab selected
    *Go to the Permissions tab (Tools > Page Info > Permissions) to check the permissions for the domain in the currently selected tab
    It is also possible that the server uses multiple servers and that Firefox sees this as a new website.

  • Write to File Multiple times WTK 2.5.2

    Hello All
    I am trying to write to a file multiple times (in WTK 2.5.2 on Win XP SP2). So I create a FileConnection and create a PrintStream with it. Using the PrintStream I write data to the file multiple times.
    The problem I am facing is that the write happens the first time (after the usual security prompts) and not after that. The code is below. The second time onwards the security prompt displayed does not get closed and the application remains non responsive
    public class IOWriter {
         private PrintStream out;
         public IOWriter() {
              String sMemCardRoot = System.getProperty("fileconn.dir.memorycard");
              String sFileName = "System.out.txt";
              try {
                   FileConnection fc = (FileConnection)Connector.open(sMemCardRoot + sFileName, Connector.READ_WRITE);
                   if(!fc.exists()) {
                        fc.create();
                   out = new PrintStream(fc.openOutputStream());
                   println("Initialized");
              } catch (Exception e) {
                   e.printStackTrace();
         public void println(String sData) {
              if(null != out) {
                   if(null == sData) {
                        sData = "";
                   out.println(sData);
                   out.flush();
         public void unInit() {
              out.close();
    }I have set the fileconn.dir.memorycard System property to a folder
    I have been trying to debug this in the WTK for some time now. have not tested on a device yet. Let me know if you could identify the problem.
    Thanks & Regards
    Edited by: SonieThomas on Jan 19, 2009 1:51 AM
    Edited by: SonieThomas on Jan 19, 2009 1:54 AM

    It sounds like you need to Use the open\create\replace VI to open a data file and get a reference to it. You use the Write File node to write the data, specifing the start pos as 0, and the offset as the current file marker. When you're done with the data file, you use the Close File node to release the file reference.
    I've written a Sub VI that should do what you want, or come close. Take it apart and see how it works. I'm including a VI that uses the Sub VI to create and append text data.
    I hope this helps!
    John Wilson
    Sanders Engineering & Analytical Services, Inc.
    Mobile, AL
    251-633-4120
    [email protected]
    Attachments:
    test_writing_gpib_data_file.vi ‏26 KB
    write_gpib_data_string.vi ‏84 KB

  • Save the file and give date & time stamp

    1. Reading the Excel file from the selection screen as a parameter.
    2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into
        Internal table.
    3. Implementing the Business Logic.
    4. Move output to Final Internal table.
    5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.
    6. That flat file should be saved with the name and location given in the Excel.
    7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.
    Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.
    Eg:
    PERSONAL Numbers              Name                                         Location
    00000001                 xxxxx-24.04.2007-10.30          C:\        
    00000002                 xxxxx-24.04.2007-10.35
    00000003                 xxxxx-25.04.2007-10.40
    00000004                                  xxxxx-25.04.2007-10.30
    Can any one help me how to save the file and give date & time stamp through hardcode?
    please help me in this issue.

    I am not clear with your problem. Based on the understanding of your question,
    there  can be two cases.
    1- U want to insert time stamp in the output file.
    2- Time stamp is already there, u just have to solve the overwriting issue.
    If your question goes with option 2, You can make use of import parameters
    <b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.
    <b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.
    Please inform if the issue is not resolved.
    Message was edited by:
            BINU RAJ BINU

  • HT6114 Since I have updated to Maverick, every time I download anything, it automatically saves the file on my desktop.  I do not want it saved on the desktop

    Since I have updated to Maverick, every time I download anything, it automatically saves the file on my desktop.  I do not want it saved on the desktop.

    Download how?  If you are downloading via Safari, see Safari Preferences, General.

  • I recently downloaded DOSBOX (a DOS emulator). I have since uninstalled the file and removed it from my download history, yet every time I use Firefox, I get a pop-up to save the file (re-download) again. How do I fix it?

    I recently downloaded DOSBOX (a DOS emulator). I have since uninstalled and removed the file from my system, yet every time I access the net, I get a pop-up to save the file (re-download) again. How do I fix it?

    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • I cannot print any websites; every time I press "print" it goes to "save the file as [xps]" instead. What's up?

    I cannot print any websites; every time I press "print" it goes to "save the file as [xps]" instead. What's up? I can print in Word without problem.

    Bless you, bless you, bless you. After months of living with this annoying problem and not being able to print out emails or websites it is, in a stroke, totally solved. Thank you! It works. It's a wonder and you're a winner!
    Paul

  • HT201250 I accidentally didn't save a document on my desktop--a report.  Can I go back with time machine and recover my desktop and save the file?

    I accidentally didn't save a document on my desktop--a report.  Can I go back with time machine and recover my desktop and save the file?

    If you saved it at least once, then time machine should have a copy of the document at the state you last saved it.  I'm guessing tha's not the case however or the copy of the file would still be on your Desktop.
    If you never saved it a single time, yet closed the window and dismissed the warnings about an unsaved document, then you are out of luck as far as I know.

  • Every time I try to print from word.mac it tells me that it can't save the file because I don't have permission then it closes the file. what do I do?

    Everytime I try to print a doc from word.mac it tells me that it can't save the file because I don't have permission then closes the file. What do I do to change this?

    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Ever time i save a file in jpg it saves the file that was 4 to 5 meg to 720 kb

    i
    am a photo stock photographer when i down load my files from my
    camera they are between 4 to 5 meg in size
    but when i bring up in photoshop to edit them after i save them
    in jpg as format cus
    tomer wishes they save in a 720kb or less file size i need thes files to be at least 4 meg in size so what am i doing wrong?

    I am sorry, it is very difficult to understand exactly what you are asking.
    When you download files from your camera to Photoshop they are large, several megs.
    JPEG's coming directly from a camera for the most part have very little compression applied to them as so are much larger file size then an editing application would save them as.
    Now if I am understanding correctly you are attempting to compress the images to 740 k or less per image.
    When you choose the save the file, choose file>save as and choose jpg from the drop down and select OK.
    You will get a box with jpeg options, it is from that box you can select in the image options section  the amount of compression you want applied to the JPG the more compression the smaller the file size. keep in mind too much compression starts to produce jpeg artifacts and distortions so not too much compression.

  • Embed same SWF file multiple times in Flash file

    I want to include the same SWF file multiple times in the same flash file. I have a plain box that is clear, that becomes visible when clicked. I want to create a grid of them (about 50+). If I copy the layers and actions, they interfere with each other so I want to embed multiple SWF files into one file and then save it to embed in an interactive PDF. If I save one square and embed it into the PDF multiple times, the file becomes too big to work. How can I embed interactive SWF files over and over into 1 SWF file? I don't have a ton of knowledge with Flash....

    you edit your html file to embed multiple copies of your swf.
    it's generally easier to control the layout if you use swfobject (but you can just copy the code published by flash pro) to embed the swf.

  • Acrobat XI cannot save the file, cannot read document

    Recently acquired Acrobat XI with a new scanner. with several specific files that were sent to me, I get an error message that it cannot save the file because it cannot read it error (135). 3 out of 4 documents are originals. The 4th was apparently printed out and scanned. No problem with it. Any suggestions? I've pretty much tried everything and only solution seems to be creating jpgs files and then turning them back into a PDF file. Another party who received the files reports she has no problem with it. My guess is that she has an older version of Acrobat. I'm having the same problem with the Reader version.

    Thanks for the response. I sent a response to the email notification but since I don't know if that puts my response on the forum, I'm putting it here as well. Yes, Under "help" I've run the updates multiple times and none are available. I did see a fix that sounded like it was for this type of situation but I could not find the switches in the program to carry out the recommendation. It sounded like the problem was that XI has trouble "reading" some documents and gets "hung" as a result. The solution was to turn off this feature. But I don't see how I can do that. I downloaded Soda PDF (alternative program) and it did not have any problem with it. Also, someone else opened it with no problem.

  • I can no longer directly print from the USPS print servelet. I now have to save the file and rename the extension to PDF load in another program to print. It used to be automatic. What happened?

    When trying to print from the USPS website (to print a label) when I click to pay and print instead of my print selection screen coming up I get the "Firefox doesn't know what to do with this" screen. THrough some web searching I found I can save the file, then change the extension to PDF and load it in another program and print but it adds two steps and is a real pain. Why would this have changed????

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See also "Disable virus scanning in Firefox preferences - Windows"
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.

    I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week, Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.
    The file name has no special character in it, just letters and no spaces.
    I have done this in the past and it has worked, but now it will not.
    I have not upgraded any software, that I am aware of.
    After scanning, the Image Capture pops up the Scan Results with the file name in the window, but neither the Scan Results nor the Image Capture window responds to inputs.  The Image Capture window is frozen, with only the "Overview" and "Cancel" buttons active (but non-responsive).
    Is this a software issue or a scanner hardware issue?  I am using a HP Photosmart C6200 series printer/scanner on a network using a Time Capsule airport.
    Thanks.

    I had the same problem.
    Got a 90% fix.  Apparently the Mavericks preferences won't work with Yosemite, so I just deleted the Image Capture preferences.
    Unfortunately, the "Scan to" folder seems to be permanently set to the Pictures folder.
    1.  Quit Image Capture
    2.  Go to Finder > Go > Home, which opens up your home folder (named after your user name)
    3.  Open Library > Preferences > com.apple.ImageCapture.plist - Drag this file to the Trash
    4.  Start "Image Capture", click "Details" and change all your settings as you prefer
    5.  Quit and restart "Image Capture".   Notice it remembers all your settings except "Scan to" folder.  It insists on saving to "Pictures".
    That's as far as I was successful.  I tried changing the "Scan to" folder to "Desktop", but on launch, Image Capture always sets it back to "Pictures".
    This is what I tried:
    6.  Download and install "Pref Setter" from http://www.nightproductions.net/prefsetter.html
    7.  Quit "Image Capture".  Right-click on "com.apple.ImageCapture.plist" and open with Pref Setter.
    8.  Search for "Pictures", which finds "~/Pictures" (the tilde character at the start means your home directory).
    9.  Double-click on "~/Pictures" and change it to the folder you prefer.  I like "~/Desktop"
    10. Choose File > Save then Quit from Pref Setter.  Note that re-opening the plist file still shows "~/Desktop"
    11. Start up "Image Capture" -- on startup, "Image Capture" sets "Scan to" folder to "Pictures"
    I consider this a bug.

  • How to save the files to a USB memory plugged into the EVS-1463RT

    I am trying to collect images with EVS-1463RT by running a vi. The EVS has LV Real Time v13.0.1 installed. The vi runs well and save images to a folder ('C:\Images\') in the development PC. But, when I deploy the vi to EVS-1463RT, the vi cannot find the directory and nothing is saved in the folder. I am considering to save the files to a USB drive connected to a port on the EVS. Would it be possible to save the image files to a USB memory plugged into the EVS-1463RT? If so, what would be the file path to the USB connector?

    Thanks for the information.
    Then, the problem becomes where I get this "USB Storage Support". Search in the NI site doesn't tell me much other than something related to LabVIEW Communications System Design Suite. Is that what I need? I am not sure if I have it. If it is not easily available, another option can be using a CompactFlash card as long as I know the file path to use. Thanks.

Maybe you are looking for

  • Payables Open Interface Purge completes with error "Invalid Cursor"

    Hello, I'm trying to run Payables Open Interface Purge (version 115.8) and get an invalid cursor error in the beforereport trigger. Does anyone know the cause and remedy of this? A portion of the log is below. I've looked at the cursor and everything

  • When I save an e-mail as a file, it opens (seems stuck) to the same old one saved earlier. How do I unstick it?

    I use a MAC desktop and Thunderbird with latest update. Recently, when I've tried to open an e-mail that I saved earlier as a file with the .eml suffix, what opens is always the same unrelated e-mail that I saved earlier to an unrelated file. It seem

  • LOtus Traveler on Nokia Lumia 800

    I'm using Lotus Traveler on my Nokia E75, but can't find anything on support for Lotus Traveler on the Nokia Lumia 800. When can this be expected?

  • Quick Edit clip group

    Hi! A new feature to create for new objects is very good (draw inside is the simple and quick). Thank You! But the editing of such an object is still difficult. I would like to be able to select a new object of type 'Clip group "select tool" Draw Ins

  • Win 7 Blu-Ray DVD driver installation failing

    I have a user who just purchased a new HP Pavilion Entertainment laptop Model dv6t-2000.  The DVD drive is identified in the Device Manager as "hp BDDVDRW CT21L".  The drive appears in Device Manager with the classic yellow icon and the properties li