How to tell the script that I want to save unsaved files, but not to replace the old?

Hello world

I had this script

docs var = app.documents.

for (var i = docs.length - 1; i > = 0; i--) {}

If (.saved docs [i] == false) {}

docs [i] except (new File("~/Desktop/Document.indd'));

docs [i]. Close();

}

else {}

docs [i]. Close (SaveOptions.Yes);

}

}

Close and save files

But if I have two files or more, I want to save the files as Doc1, Doc2...

the new file will never replace the old

Can someone tell me how I can do?

Thank you

Respect of

Teetan

Hello

The 4th line change as below:

        docs[i].save(new File("~/Desktop/Doc" + (i+1) + ".indd"));

Vandy

Tags: InDesign

Similar Questions

  • How to tell the difference between recommended, and optional updates long after they have installed bene?

    I have a Vistaprogram of the window running on my Toshiba laptop.

    In the past, I've confirmed that optional udates be installed. Please help: now I want to uninstall optional updates because my computer is slow.  How to tell the difference between recommended, and optional updates long after they have installed bene?

    Hey monkey 44,

    I suggest you view the history in Windows Update:

    http://Windows.Microsoft.com/en-us/Windows-Vista/see-which-Windows-updates-are-installed

    Those listed as recommended is technically optional.

    Before you delete updates the computer, I suggest you try the steps from the following link to improve performance and check if that helps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/ways-to-improve-your-computers-performance

    I hope this helps.

  • matter of record: How do I control which folder is open when I search the file I want to download or the file I want to save a file to?

    When I use internet, how can I control what file is opened when I search the file I want to download or the file I want to save a file to?  He always seems to be the last that has been opened, but I want the default on my desk.

    Perhaps the following links provided courtesy of SpiritX MS MVP will help:

    Set the Internet Explorer default download path.
    http://www.tweaklibrary.com/Software_Applications/Internet-Explorer/27/set-default-download-path-of-Internet-Explorer/10153/

    How to change the Internet Explorer default download directory
    http://www.windowsreference.com/Internet-Explorer/how-to-change-the-default-download-directory-for-Internet-Explorer/

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Want to download 10 W but not able to do that, during installation, a problem arises and the previous operating system is restored.

    My laptop is preinstalled with Windows 7 Home Basic.  At the free launch Windows 10 I downloaded the same and after 2 months, the hard drive crashed.  The repair shop trying to fix formatting, but could not revive.  This is why I bought a new hard drive and repair charge shot Windows 7 Ultimate edition.

    Now, I want to download 10 W but not able to do that, during installation, a problem arises and the previous operating system has been restored.  When I posted the question about how to solve this problem, I was told to try the download by way of USB/ISO file.

    Now my question is that

    one) can I reload Windows 7 Home basic as I have the product key?

    (b) I can then download Windows 10 according to the normal procedure?

    I'm not tech savvy, afraid to download files in USB and then load into the laptop, so this question.

    Concerning

    S Subramanian

    Original title: Windows 7 Home basic

    You can directly download Windows 10. Windows 7 complete edition currently installed is not genuine.

    When you upgraded from a previous version of Windows, what happened is that (your PC) hardware will get a digital right, a unique signature of the computer which is stored on the Microsoft Activation servers. The real Windows 7 or Windows 8 license you were using previously will be exchanged with a key to the diagnosis.

    Whenever you need to reinstall Windows 10 on this machine, go just to reinstall Windows 10. It automatically reactivates.

    Therefore, there is no need to know or get a product key, if you must reinstall Windows 10, you can use your Windows 7 or Windows 8 product key or use the reset function in Windows 10.

    Step 1: How to download official Windows 10 ISO files

    Step 2: how: perform a clean installation of Windows 10

  • On another PC I want to save my favorites, but my browser Firefox does not work how can I make the backup, before I reinstall Firefox

    On another PC I want to save my favorites, but my browser Firefox does not work how can I make the backup, before I reinstall Firefox.
    Firefox cannot renew its tabs and now won't run and let me do a backup

    This may be considered to be solve my problem.
    I decided to uninstall the rogue program Firefox download and reinstall the same version (No. 8). I used Windows XP Add Remove programs who asked if I wanted to save the settings of Firefox until I uninstalled Firefox. I said yes and operated with the uninstall. I couldn't find a Firefox 8 so I went for the 12 version and installed on the laptop. This version 12 now works with all the passwords one favorite of the uninstalled 8.
    Thank you for all your help and advice.

  • How to reset or change 'that should firefox do with this file' option in Firefox 3.6.6

    How to reset or change 'that should firefox do with this file' in Firefox 3.6.6.
    Accidentally, I changed it to save the file to .pdf files and now I want it reset to default asking whether to open or save.

    any help please

    Thank you
    REDA

    Check the setting in tools > Options > Applications

    See 'Reset download Actions' and ' File handling in Firefox 3 and SeaMonkey 2 ":
    http://KB.mozillazine.org/File_types_and_download_actions

  • Everytime I open an email or try to send a new message, following the pop box: DOWNLOAD of FILES you want to save this file?

    Everytime I open an email or try to send a new message, following the pop box: DOWNLOAD of FILES you want to save this file?  I have to click 'Cancel' twice in the order fdor the box go away.

    original title: DOWNLOAD the FILE you want to save this file?  Send error message

    Hi Harold Sokyrka,.

    1. When was the last time it was working fine?
    2. Did you the latest changes on the computer?
    3. Are you using any e-mail program or is it access webmail?

    If you use any e-mail program on your computer, then check and make sure that the default e-mail program is set correctly on the computer.

    How to change the default mail Client

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

  • I want to backup my files but cannot find a 'how to' in HELP in Windows XP Home Edition

    original title: backup the files? HUH?

    I want to backup my files but cannot find a 'how to' in HELP in Windows XP Home Edition. Can someone please tell me where to find this info?

    Hello

    If you do not know how to back up files and folders in Windows XP Home Edition then the below articles might help you.

    How to use the backup utility to back up files and folders in Windows XP Home Edition
    http://support.Microsoft.com/kb/308422
    How to use the backup utility to back up files and folders in Windows XP Home Edition
    http://support.Microsoft.com/kb/320820

  • How to restore the old user profile

    I wanted to access some downloaded files that was stored in a temp folder. I did have access to this folder so I changed my folder option to be able to view hidden directories and files. He said that I had to be an administrator to do and I said OK. He then proceeds to change the attributes on thousands of files. In the end, I got is more access to my file and the original files, I became a new person, so to speak. I can manually view my old records, but I want to restore my old user profile, because this new profile is created a lot of problems with previously installed programs. I have two NTUSER. DAT files in my user C:\User\John folder. The dates are when the computer has been initially implemented 16/08/2012 and when the profile changes yesterday 07/02/2013. How to restore the old profile (from 16/08/2012)?

    Thank you

    Johnny

    Hi Johnny,.

    Thanks for choosing Windows and thank you for providing an opportunity to help you.

    According to the description, you have problems with the restoration of the old user profile.

    1 have been connected as a standard user?

    2. What are thousands of files you're talking about if you want to have access to the temporary folder?

    This problem can occur because of corruption of the user profile.

    Method 1: delete the new NTUSER. DAT folder and check if it helps.

    Method 2: Perform the System Restore to an earlier date and check if it helps.

    System restore

    Answer to us if you are having problems with the user profile or any other issue of Windows, and we would be happy to help you.

    Good day!

    Hope this information helps.

  • Satellite A30 - 504 - how to remove the old HDD and new mount?

    Hello

    I have problem with my laptop satellite. After the turn on I've got Announces s.m.a.r.t. disk is damaged.

    I do not have it is why I do not know how to remove the old HDD and replace the new statement.
    I will be grateful for the help.

    Hello

    Looking first for similar discussions in this forum? I guess that you didn t ;)
    The advanced search option is very useful and you can search for single yarn that could help you.

    I found this:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=12526&MessageID=45688

    and this

    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=12547&MessageID=45752

    It seems that the hard drive on your A30 is in the optical drive, and you must remove all first the STRANGE before you get access to the HARD drive.

    Best regards

  • How to force the old games in a window instead of full screen__

    How to force the old games in a window instead of full screen
    to lighten my load of vid card and switch between windows without minimize
    This is for vista

    Some games have a function of window mode and others are not.

    as:

    If you put at the end of the section 'target' shortcut in the Sims 2, the command w as follows:

    | "X:\programs\games\sims 2\bin\Sims2.exe" w |

    The Sims 2 will run in windowed mode those that run you it!

    but not all games have the option!

    then go to Google and look for some info there ;)

  • How to activate the old Windows XP with new serial numbers?

    \How to activate the old Windows XP with new serial numbers?

    You use a retail disk you had?  If so, then the keys do not work due to the fact that they keys of volume.

  • HP Color LaserJet 2800 all-in -: how to remove the old Imaging drum for my HP LaserJet 2840 printer to install a new

    I have some new imaging drum for my HP Color LaserJet 2800 all-in-one printer series, please tell me how to remove the old.  Thank you.

    See the link below:

    http://h20564.www2.HP.com/hpsc/doc/public/display?docid=emr_na-c02850160

  • How to remove the old devices in list "managed device"?

    I would like to know how to remove the old devices (disused) from the list of devices managed on version 2.2?

    Go to management > Unmanage devices and select the devices you want to delete. Click the right arrow to move them in the right pane, and then click on the button "unmanage".

    Thank you

    Lynden

  • How to remove the old key wifi Windows 7? It is automatically to connect to the old key... If I delete also the same old key is coming.

    How to remove the old key wifi Windows 7? It is automatically to connect to the old key... If I delete also the same old key is coming.

    How to remove the old key wifi Windows 7? It is automatically to connect to the old key... If I delete also the same old key is coming.

    Here you go:

    1. Control Panel
    2. Network and sharing Center
    3. Manage wireless networks.
    4. Right click on the wireless network unwanted.
    5. Delete
    Also note that since there is a network problem, a Forum that focuses on networking would be a better place to ask this question. This forum addresses issues of Windows security.

Maybe you are looking for