How to set up automatic backups to a specific folder in InDesign

The following script saves a copy of an InDesign file in a folder together in the same place of the file to save.

Question: How can I change the script to save the backup file to a specific path? For example, a reader network (Z:/backup). What line in the script must be changed?

A large part is appreciated.

saveVersions.jsx

DESCRIPTION: Saves the active document versions in a numbered loop

#targetengine "session".

var myEventListenerVersions = app.addEventListener ("beforeSave", SaveVersion);

function SaveVersion()

{

var myFolderName = 'Backup ';

myDoc var = app.documents.firstItem ();

Create backup only if the document has already obtained after production

(Which exists as a file on a disk)

If (myDoc.saved is true)

{

var myCounter = getVersion (myDoc); Returns the version number; It is re-defined if necessary

var myPathName = myDoc.filePath.fullName + "/" + myFolderName;

var mySFolder = Folder (myPathName);

try {}

Create the backup folder

mySFolder.create ();

}

catch (e)

{

Alert ("problem when you create the folder")

}

Create copies of the version

var MyName = setVersionName (myDoc.name, myCounter);

Folder corresponding (myDoc.fullName) (myPathName + "/" + myName);

}

}

function getVersion (aDoc)

{

If (myMax = aDoc.extractLabel ('max'))

{

Version number

myVersion = aDoc.extractLabel ("avezversion")

}

on the other

{

Version number

do

{

Prompt Max. Version number

myMax = prompt ("Maximum Versions:', 5");

If (myMax is nothing)

Exit();

} while (< 1 myMax)

myVersion = '0';

aDoc.insertLabel ("avezversion", myVersion);

aDoc.insertLabel ('Max', myMax);

}

Der Versionsdaten Sichern

myNewVersion = setVersion (aDoc, [myMax, myVersion]);

Return myNewVersion;

}

setVersion (aDoc, aData) function

{

myNum = number (aData [1]);

(myNum > = number (a - Data [0]))? myNum = 1: myNum ++;

aDoc.insertLabel ("avezversion", String (myNum));

Returns a String (myNum);

}

function setVersionName (aName, aCounter)

{

myIndex = aName.indexOf (".indd") var;

If (myIndex == - 1).

{

var theNewName = aName + '_' + aCounter;

}

on the other

{

var theNewName = aName.substring (0, myIndex) + '_' + aCounter + aName.substring (myIndex, aName.length);

}

Return theNewName;

}

Delete this line: var myFolderName = 'Backup ';

Replace this line: var myPathName = myDoc.filePath.fullName + "/" + myFolderName;

with: var myPathName = "Z:/backup ';

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • How to set up automatic backups in InDesign

    Does anyone know how to set an automatic to InDesign? Yes, I am aware that there are tons of available general safeguards and can always ' Save as ' to make copies. However, in a team environment where many people work on InDesign files, need a more robust solution to backup specifically for InDesign. From Quark, there is an automatic backup available at defined intervals. Running: InDesign CC 2014.

    I came across a script that seems to be exactly cela, but appears to have been written for Apple Script as oppose to the Java Script. Maybe someone can translate that into Javascript. Using a windows platform, Apple Script of course will not work. The script is the following:

    Anyone with the help, thank you very much in advance.

    Tell application "Finder" to the value backupPath file "Macintosh HD:documents:backup files.

    Tell application "Adobe InDesign CS2"

    Try

    CheminMonFichier the value path of the active document

    full name of the active document myFile value

    put the cd with the current date

    Set to nuName name of the active document

    the value nuName nuName & "-" & ((year of cd) & (month of the cd) & (cd day) as String)

    the value nuName nuName & "-" & (cd time) as string

    Tell application "Finder".

    duplicate the backupFile myFile value to backupPath

    the name of backupFile nuName value

    tell the end

    Save the active document

    in case of error

    Save the active document

    try to end

    tell the end

    Martin Fischer wrote that a script, saveVersions.jsx , published in www.hilfdirselbst.ch:

    InDesign Script - automatic Sicherungskopien in Unterordner create

    His companion script is VersionsCounter.jsx :

    InDesign Script - automatic Sicherungskopien in Unterordner create

    Maybe you can use them.

    saveVersions.jsx is a "Save as copy" in the background, whenever you do a 'save' or ' Save as ' in your document. The versions are stored in a folder named "versions" in the same folder or your original InDesign file is located. Versions are numbered (it will ask for time to number first Max you use). You can reset this number with VersionsCounter.jsx.

    Should work with all versions of InDesign CS3 and above.
    I use it myself with InDesign CS3, CS4, CS5, CS6 and CS5.5.
    Didn't test for superior versions.

    You must place the code in the folder the folder scripting InDesign scripts. If there is no startup script, simply create a named exactly like this (without the quotes): "startup scripts".

    Uwe

  • How can I set up automatic backup on iPhone 6s

    I bought a new iPhone 6s more yesterday. I had been to support my old iPhone 5 up to my computer. I thought that the new phone was set to automatic backups for iCloud, but I just got a notification indicating that the phone had not been saved for many months.

    How we configure it back to iCloud automatically at a certain time of day?

    You cannot set it for a certain time of the day. Once your backup is activated on the phone, backup it once daily when the unit is connected to power, a Wi - Fi connection and the screen is locked. Go to settings > iCloud and make sure active backup, and you can try a manual backup. You can use this document to support to solve the problems of the iCloud backups.  Get help from backup of your device in iCloud - Apple Support

  • Time and date of the Iphone 6s set contacts automatically / backup

    Hi my name is Rebecca. Please be patient, this is a long story with a question to which Apple for a month and a half has not been able to solve. The end of February, I went to Sprint to upgrade my iphone 6 to a 6 s. (my 6 had no problem). The backup and restore to the other went off without a hitch. Two weeks having the phone, date and the value automatically switched to a GMT setting which is 4 hours ahead of New York. Assumption is that the phone has been deserted. I got a new phone and everything has been backed up and restored again. Less than two weeks later, the same goes for the 2nd iphone 6 s.  I went to Sprint and got a 3rd iphone 6 s. backup and restored all again. Less than a week later for the 4th time, the new iphone 6 s time and date switched to the time zone GMT 4 hours ahead of New York. At this point, I called Apple Tech support. A very nice tech Jason worked with me for 2 weeks to fix this. He sent Apple a 4th iphone 6s. We did a backup and when the new phone came in did us a restore. A few days later, the same problem. Apple accuses Sprint, Sprint complaint to Apple. At this point, Sprint said that my sim card was corrupted and he sent me a new. On the phone with Jason, we did a reset of the iphone 6s failing manufacturers. Removed the corrupted sim card and put in a new vacuum. Phone restarts and when you get to the Setup screen, it asks "set up as a new user or a user to return. Jason said as a new user.  I clicked on new user. Following her request for an apple ID. Jason said I should put in my existing apple id (although it has been activated on as a new user). At this point the phone wouldn't turn on. On the phone with Sprint. They did not understand as to why the phone would not activate. Jason suggested that I put my original sim card in (which was noted as corrupted), then the active phone. At this stage because I had not done a restore, the only information on my phone now an old backup who had my contacts and some of the notes, images etc. Jason said to do a restore after just 24 hours to be sure of the time and the date stay correct. Not happened. Less than 24 hours, the date and time that is set to automatic changed to the GMT time zone. Jason was out of suggestions. We left him there. I am very angry to pay more than $800 for an iphone that feature very very important does not work. On mine, I restored my phone and thought what I'd do. I then did a backup. I'll stop my icloud. I have reset my builders phone by default and when I went through the whole upward I plugged my phone in itunes and restored my phone from my computer backup. (Icloud is always OFF). Less than 24 hours later at the date and time in GMT area again. Once again, that I have a phone very very expensive with a feature that is vital for me, I can't use. Yes, I could turn the machine off, but I shouldn't do that. So here's my question: Iphone 6, I have not had any problems with my icloud or my sim card or the date and time. 6 s IPhone that I do. I got iphone 4 brand new 6s with the same problem. Is - that my sim card is corrupt and transfer information corrupt, though only it worked fine in my iphone 6? Second question: I don't want to sign up for a new apple id and start from scratch. This will screw up my gmail which is linked to the apple ID. How can I back up my contacts only on my computer and then be able to reset my phone manufacturers by default, then erase all information from my existing apple ID in order to use again, but only restore contacts which is the worst part of transfer phones. Apps and notes, photos and all the rest is not a problem to start from scratch, but contact is almost impossible to have to type each hand one by one. Please someone out there with a solution. Thank you in advance.

    Two recommendations.

    1 post this issue on your part on the iphone forum, to confirm the number two with someone else.

    Use iPhone

    2. you must stop working with Apple. Your iPhone download the signal giving them news of the time and origin of this signal

    I have no idea, but it's not from Apple. Coming here or talk to Jason you wasting your valuable time. It is at least

    get paid for it, you're not. Every second that you type in this position, mine or every second you spent on reading

    the phone with Apple after the second phone had the same problem you've wasted talking to the wrong party. Even than calling your

    manufacturer of furnace you paid 5000 for oven when your gas is not delivered on time or bad quality. And I have

    don't say it's Sprint, cause I don't know, but it's something that gives this info to your phone.

  • How to disable the automatic backup in windows 7

    I changed to 'never' backup scheduler, but again, the computer saves the data and invites me to insert a disc for the copy of the backup files.

    I have my files backed up offline and don't want or need this help.

    How can I disable it either doesn't work at all?

    Delete the calendar?

    http://superuser.com/questions/315322/change-scheduled-Windows7-backup-setting

    http://Windows.Microsoft.com/en-GB/Windows7/set-up-or-change-automatic-backup-settings

    PS This is windows backup that runs and not a backup provided by the manufacturer of your PC?

  • How to set an incremental backup in windows 7 x 64

    My question is simple and clear all of you, I have a windows 7 x 64 Professional Edition installed in my pc. and today I try to define backup an incremental backup in windows 7, but I cannot discover the incremental backup feature he have only one type of backup, but I don't know he is a backup is incremental or a normal backup. I think that windows 7 is not provide 5 types of backup that is providing windows xp or windows 2003 R2. send a link please if any third party software should provide any incremental backup feature.

    Hello

    In Windows 7, there is no option to set the incremental backup. However, when you select files and schedule a backup, it automatically performs an incremental backup in the background.

  • How to set up automatic bcc yourself when sending outgoing mail?

    I would like to me bcc for all messages I send since I read my mail in other platforms when I'm away from my office. I was able to do in Eurodora mail before. Thank you.

    I would say IMAP, so you can always see your "sent" folder.

    However, Tools | Account settings| < select account > | Copies & folders allows you to set up automatic CC: and Bcc: addresses.

  • How to disable the automatic backup in DWCC2015

    Research gave to go edit > Preferences > Documents > and so on.  But there is no other choice for Documents in tabs preferably.  Someone at - it a good answer?  Very appreciated for any input. It is CC2015 and not CC2014. I just got this choice, it was relevant. Thank you

    Peoj

    There is no automatic backup in DW.

    "I guess you mean either that pesky" you want to save "dialogue that opens all the time while working in PHP pages, or the Auto push for testing server"feature.

    To get this pop-up to stop popping up, turn on design mode when working in PHP pages by clicking on the arrow of the direct button on your toolbar and selecting Design. There is no way to get rid of everything working in Live View mode with the PHP pages.

    The automatic thrust to the test server, you can get rid of it by going in...

    Site > Manage Sites > choose your site > Edit > servers > choose your server > Edit > advanced > uncheck automatically "push files to the test server" > save

  • How can I take my images in a specific folder on my HD in LR and the transfer of an external HD to make them appear in LR

    How to make my images in a specific folder on my HD in LR and the transfer of an external HD to make them appear in LR.

    My external hard drive is connected to my computer.

    In your operating system, copy (and not move) pictures of the external HD follow these instructions, do scroll down to the section called "update folder location". Adobe Lightroom - find folders and files moved or missing

    Once you have done this, and everything works as expected, you can remove photos from the internal HD.

  • Portege R600 - how to set resolution automatically?

    The R600 is on XP Pro SP3 and a computer very well. I wear it to work and a large monitor, and the video is very good. When I go home, however, I use the computer as a laptop with no external monitor.

    I have to go on the desktop > properties > settings and adjust the video up to 1280 x 800.

    Is there a way to tell the machine to do it automatically?

    Thank you!

    Hello

    You can set the display as extended desktop.
    Then, you will not have to change the resolution on the internal display.

    The extended desktop can be configured for the external monitor and you could leave this setting also with the laptop at home.

    I have connected my laptop to external monitor and have changed the screen extended desktop.
    Can I use different resolution for the internal display and the external monitor.

    PS: you can change very easily by using the FN + F5 keys

  • How to set an automatic resizing on the new tabs in firefox?

    Rather than use the "zoom in" feature on each page, when I open a new tab, is there a setting that will change the defult page sizing?

    Thanks, makes everything works now. Really grateful, its saved my head from expolding!

  • How to set up a backup to send emails with smtp server when Exchange is hosted

    How can I go on the definition of the Task Scheduler to send the paper with the smtp server, when our Exchange is hosted by Microsoft 365?

    Hi Jay,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the Exchange Server on TechNet forum. Please post your question in the Forums TechNet in Exchange Server.

  • Does anyone know how to set the automatic answer of my blackberry by programming feature?

    I have a BlackBerry Pearl and I can put it on auto answer when the phone out of the case through the menu options, but I was wondering if you can do this via code.  I am writing an application that I want to activate the automatic response feature and turn it off when someone pushes a button.  Thank you.

    I'm not sure that you can enable or disable the automatic response of the device programmatically property.

    But what you can do is to use the EventInjector.

    You can programmatically check if the device is "case" and then you can also listen to incoming calls. then use the EventInjector

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=43295&query.ID=10...

  • How to set the incremental backup of level 1 to restore on a different database

    Hello

    I have a question what is annoys me all week.

    I have 2 databases. ORCL and ORCL2. ORCL2 is an auxiliary ORCL database. ORCL my database is backup incrementaly Sunday level 0, other days level 1. Now, I would like to update my ORCL2 db every night to be synchronized with the ORCL database. Is this possible? I have Oracle Standard Edition, so I can't use Data guard. If you can help me I would be very thanful. Or if you could send me a link to some textbooks.

    I have db Oracle 10.2.0.3 Standard Edition

    Windows Server 2003 Standard edition

    With respect,

    Ivan

    Hello Ivan,.

    You can recover the database duplicate, once created each day with an incremental backup of the target database.

    What you need here is a simple restore to another host without opening the database with resetlogs. RMAN: Restoring a backup RMAN to another node [ID 73974.1]

    Thank you

  • How to put tagget received emails in a specific folder on Thunderbird?

    Example: put the emails received by string "[tag_example]" at the beginning of the subject in the folder "folder_example".

    Use a message filter. This should be able to do.

Maybe you are looking for

  • Disable password in dm1

    I want to disable the password in my laptop. HP Pavilion DM1, Windows 7 Home Basic 64 bit.

  • Equium M70: card wireless regularly abandons the connection

    Hi, I wonder if anyone can help. My map regularly just Equiuim M70 wireless abandons its connection. If you browse on wireless networks, it seems my WEP encrypted network and it's one to connect to, as it says "Automatic" by him.If you click Connect

  • T440S corrupted after update solution center, no menu start

    My T440S has corrupt files and the various problems which all seem to have started (maybe) an update of the lenovo Solution Center. I have Windows 8.1, model number 20AQ-CTO1WW. Problems:-"Windows Start menu" anything when you click it doesn't. -You

  • Unable to connect media Player to the online store

    Original title: Media Player Media Player does not connect to the online... frozen store

  • My computer has a problem of heat sink

    Original title: why the computer having problem of heat sink becomes so slow perforamce? If someone answers, I'd appreciate it. Why the computer having problem of heat sink becomes so slow perforamce? If someone answers, I'd appreciate it. I had clea