[js] Change the name of the file?

How can I change the name of a file in a script so that when I want to save it, I don't have to use a dialog box? I tried document.name =, but it said it was unalterable. Thank you!

Try using save () - order of the DOCUMENT:

Save ([to: file] [, stationery: boolean = false] [, versionComments:string] [, forceSave:bool = false])

for example

var myFile = new File('~/Desktop/test.indd'); // new file object
app.documents.firstItem().save(myFile); // save to ...

Martin

Tags: InDesign

Similar Questions

  • Can I change the file name of the .bar file

    Hello

    I built an application in Release for device mode.  He prodcued a filenamed bb10app.bar. Is it possible to change the file name to tell xyz.bar after it is built.  It is an application internal meaing only avaiable to our staff.  If I do not file name change how will I know what app it is. Given that bb10app.bar seems to be a default file for any application name.

    Thank you

    Joe

    Yes, you can change the file name of the file BAR, just keep the .bar extension and you shouldn't have any problems.

  • How can I change the file name on the home page?

    I'm changing the file name of the home page...

    I'm on page properties > options > filename... but he is frozen as index.html

    Is there a way to change that and name it something else?

    Hello

    As most web servers consider index.html as the site's home page, the option is grayed out in Muse to rename indexes (homepage).

    How ever, you can go ahead and change the name to other pages in the site map.

    Concerning

    Vivek

  • [Solved] When you change the file type for RAR files, it also changes the file type of the ISO XP files

    I tried to change the file type description, as well as in default and the icon for the rar and iso programs file types inmenu\ tools\folder options\file typest\advanced, but to change the settings on a file type automatically changes settings on the other.

    How can I do this via regedit?  What can cause a bug?

    * original title - xp: types of files RAR and ISO locked together, the same treatment! *

    Hello

    1. How are you sure that you change the individual file extension and not the entire folder?
    2. how exactly you try this?

    To change a name of file, all you have to do is right click on the file, and then click Rename, instead of the path you describe in the thread.

    See also the section below to associate the default program for different file types.
    How to change or choose the program that starts when you double-click a file in Windows XP
    http://support.Microsoft.com/kb/307859

  • Change the file extension

    I use Windows XP Home Edition.  How do you change the file extension when the system cannot open the picture?  It was recorded as "All Files".

    Go to control panel, folder (in Classic view) options, go to the view tab and scroll down to find Hide extensions of known file types.  Uncheck the box and click on the file.  Rename the file and change the file extension.

  • Setup could not initialize - I've lost hours trying to find solutions online and forum... to change the file to add .old - does not work; Open the file 2/2 still didn't work... Help!

    Setup could not initialize - I've lost hours trying to find solutions online and forum... to change the file to add .old - does not work; Open the file 2/2 still didn't work... Help!

    Please see the links below:

    https://forums.Adobe.com/thread/1848277

    https://forums.Adobe.com/thread/2055767

    Let us know, if you still get the same error even after trying it all the steps mentioned

  • Cannot change the file AdobeCaptivate.ini

    I just installed the latest version of Captivate on my new Zenbook and when I tired to record a demo, I got this message: "Capture is denied because the high-density display has been detected. "Please Set DpiAwareness = 1 in AdobeCaptivate.ini and restart the application.

    So I found the file, open it in Notepad and edited. But when I tried to save, I received this message: having said yes, I did not want to replace the file, the error message says that access is denied.

    What should I do next?

    Thank you!!

    Try to copy the file, and paste it on the desktop. Open it and change it, save it, and then drag it to the folder Adobe Captivate 9 x 64. It will ask you information Admin ID change the file, enter your creds and this job should .

    Jord-

  • Changing the file names of the photos used in the projects final cut express

    HI, I have a lot of pictures that I've used in some express HD projects final cuts.

    File names are not descriptive file name convention, but just standard camera. I want to add descriptive names, which will come out in the finder, but I don't want to damage the projects that I have created. I guess I could change one by one and tell the system where each file. But is there a better way? Thank you!!

    If you change the names in the Finder, all clips in your projects will lose the path of the file and you will have to redo the link.

    Changing names within the CTF will work OK but will not appear in the Finder, probably it will not work for you.

    I suggest you set the browser to display a miniature clip of the photo, that is maybe a solution to easily identify clips.

    Al

  • I want to change the file name format "save under" so the date and time are first.

    When I select a few emails and then select "Save as" to keep a copy on my computer, the name of the file that is created has the date and time at the end of the file name of the email.
    Sample "save under" file name: "Habitat Follow Up - Bryan ([email protected]) - 2011-11-15 0744.eml.
    Is it possible to change the structure or format of the file name if the date and time of the email are initially the file name?

    Try ImportExportTools and customize the format of the file name in the options.

    http://chrisramsden.vfast.co.UK/3_How_to_install_Add-ons_in_Thunderbird.html

  • Programmatically change the file name and path for PDFCreator

    Hello

    I know that the creation of PDF files is a common question asked on the forum but I have yet to see someone with the same problem I encounter.  I'm following the example at http://decibel.ni.com/content/docs/DOC-4552#comment-12005.  I posted a question on this page, but write again here for the hopes of a quicker response.

    I am able to create a pdf file of the file test.txt.  However, I'm unable to change the path or file name.  No matter what I select the file is created with the name and the path set in the automatic recording of PDFCreator options.  As the file is created, the reference is correct.  It seems that the cOption call nodes do not work.  If I turn on the automatic backup in PDFcreator options, I am invited with a record as a window.  This means that my order to use AutoSave (in config Subvi) does not work.  Presumably, the autosavedirectory and the autosavefilename also do nothing.

    I am at a loss, because everything seems to be OK.  Any thoughts on what could be the problem?   (labview 8.6.1 PDFCreator 0.9)

    Hello

    Have you tried to download the latest version of PDF Creator? It seems that now it's 1.0.1. If there is a problem with the ActiveX interface, it can be solved in the latest version.

    -Zach

  • You cannot change the file names more

    Why can I not change the name of my files and folders more?  One minute, he was working and the next one, only it just stopped.  He tells me that I have to get permission and then when I click on 'continue' to get permission it goes to another dialog box that says it didn't work and I give myself the opportunity to 'try' again and that does not work either.

    Hello

    Try a system restore before that happened.

    How to make a Vista system restore
    http://www.Vistax64.com/tutorials/76905-System-Restore-how.html

    \

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Windows 7 / Windows Explorer - change the file names to have all lowercase letters

    I save files with uppercase letters in the name of the file.  Since going to Windows 7, it seems that Windows Explorer continues to change the names of files to have all lowercase letters.  Is there a setting that will allow me to record names of files with upper and lower case letters without exploring automatically change them?

    Hi LeslieWeber,

    -How long have you had this problem?

    -What software changes you did on the computer before the show?

    Follow these steps and see if the problem persists:

    Step 1:

     

    Create a new user account and check if the problem is recurring in the newly created account.

    Step 2:

    If the problem does not persist in the new user account, it could indicate that your old user account is corrupted.

    Access the link below and follow the steps to repair the corrupted user profile:

    Difficulty of a corrupted user profile

  • I can't change the file name, totally legal, my agency wonder who

    CHANGING FILE NAME.png

    Hi, I found something on the forum like this, but I think mine is more simple, they have mentioned the problems of the file is not recognized, I want to just change the name BEFORE .jpeg, but here is what I get: of course, I should ask my agency, but only after your response, so I seem not too stupid. they say that all the legends should be made in the metadata, so I'm not allowed to change the name of the file from my computer.  Any ideas?

    Have you tried to change the name by using the name of file in the thumbnail?  It should work, (if you tried to rename it with one that has highlighted in your bucket under the file properties, it is not editable)

  • If I rename a clip in the body, is there a command to change the file name as in FCP7?

    In FCP7 I could rename a clip in final cut PRO, and then use a menu command to change the real file name to match:

    Final Cut ProScreenSnapz001.png

    I can do this in body or prelude?

    Thank you!

    MtD

    This option is only available in the project manager.

    FEATURE request

  • How can I change the unrecognizable FrameMaker file format?  Why has he become unrecognizable after changing the file name?

    I update an existing project in the FrameMaker10, which is located in a structure of book.  I changed the names of the files in the directory, they upgrade 11 FrameMaker and saved.  When I try to add them to the book (whose name I also updated) a problem for some files. When I try t add them to the book file, I get an error message that says that the book file is unrecognizable.  (It allows me to add it, but it appears in the file book with an icon that has a blue "M" in there.)  Why is that happening and how can I change these files to normal FrameMaker files?  Thank you.

    Try to open the problem files using a text editor or viewer of files to see what the first bytes contain. Contains all the binary files valid FM FM 11 in the first bytes of the file.

    During the updating of the books, it is sometimes better just to create a new address book file and add files to it.

    When you rename files in a book, changes at the level of the system will break any links/cross-references between files, so it is always best to use the option rename book in the file to change the names of files FM. This will keep the correct links.

  • Is it possible to change the file name given to attachments in an email button?

    Whenever I click on the standard e-mail button, I get an attachment with random alpha and numeric characters for the name of the file.  Is it possible to change the names of files to match a data field in the form or start with something that I choose?

    Thank you

    Judy

    Hi RudyLou36,

    While displaying the form in the TAB overview of LC Designer, you will always get the unwanted characters as the name of the file. Save the file and open it in Acrobat or Reader.

    You will not be able to change the name of file unless you save the file first. Here (http://forums.adobe.com/thread/462681) is an example of a number of ways to deal with parts of the email programmatically.

    Kind regards

    Rous

Maybe you are looking for

  • FF17 Personas do not display the header image.

    In Firefox 17, none of the Personas I apply show any type of image, if header or footer.They even change the color of my tabs and the text of the names of my tabs, so the personas are applied with success in some way.Looking for an answer was not cle

  • Several cards PCI-MIO-16-4 in a PC

    Hello I have two systems on the same SCXI, using a card PCI-MIO-16-4 to control instruments in a chassis.  Currently, I am working on the new software to combine these two systems in one, but without any hardware revisions.  Because of the distance b

  • Mystery of memory which disappears!

    I am running Vista and in recent weeks on 5 or 6 GB of memory are mysteriously disappear out of my C drive! Where are they going? I use Norton Antivirus and it reports no problems after complete analysis. I use very few programs on the computer and c

  • Cannot open or use Internet Explorer or Google Chrome

    Last week, we started having bad by opening internet explore.  First of all, we received a message problem with the iexplore.exe file.  We conducted some virus scans, fixed the registry, uninstalled and reinstalled IE and cannot always on it to open

  • Remove the upgrade of Windows 10 as an optional upgrade preselected

    I don't want to upgrade to windows 10 and withdrew the notification of upgrade of the taskbar and never asked the upgrade.  Now, he appeared as an optional upgrade screened in windows update and there is no visible way to remove it.  This effectively