Open multiple .indd files

Hello,
usually when I have to ask for opening a single .indd file I use something like this:
fileToOpen = File.openDialog("Open a document");
myDocument = app.open(File(fileToOpen.fullName));
But what if I have to open multiple files at once (eg. selecting them from the Desktop)?
I read from the Indesign object model that the "open" function of the "application" object can accept an array of files.. am I right?
Thanks in advance

@lglmrc – the openDialog() method comes with another argument for opening multiple files. That argument is set to "false" by default.
Setting it to "true" is the key here:
var FilesToOpen = File.openDialog("Open one or more documents", true);
for(var n=0;n<FilesToOpen.length;n++){
    app.open(FilesToOpen[n]);
Alternatively there is the openDlg() method, that also comes with the second argument.
See also:
http://jongware.mit.edu/idcs6js/pc_File.html#openDialog
File openDialog (prompt: string[, filter: any=null][, multiSelect: bool=false])
Opens a dialog so the user can select one or more files to open.
Opens the built-in platform-specific file-browsing dialog in which a user can select an existing file or multiple files, and creates new File objects to represent the selected files.
• If the user clicks OK, returns a File object for the selected file, or an array of objects if multiple files are selected.
• If the user cancels, returns null.
Uwe

Similar Messages

  • [AS] Can't open multiple indd files of a chosen folder

    Hi,
    I just can't get the opening of a bunch of indesign files inside a chosen folder with AS.
    I write this :
    --Prompt the user for a folder to be picked including indd files
    set
    b originfolder
    to (choose folder with prompt "Choisissez le dossier contenant les fichiers Indesign")
    --Try to open all the indd files included in the
    tell application "Adobe InDesign CS3" to open every file whose extension ends with ".indd" of folder
    b finalfolder
    end tell
    I am going nuts failing. I heard about a "creating list of files" way but when I try it, error says that it can't convert the files to a string.
    Hope someone can help. Thanks in advance.
    Loic

    Hi Larry,
    You 're right.
    This is the point, it works fine !
    thanks

  • How to export multiple indd files to individual PDF's?

    Is there a way without using scripting, to simply take, say 10 single indesign files (all just single 3.5x2 business card layouts) and export them to a pre-defined PDF preset resulting in 10 single PDF's? (other than one at a time?)
    I tried a few things from Acrobat 9 pro, one of them being File/export/export multiple files/  thinking that must be the ticket, but
    1) I can't find my pre-defined PDF preset in the "export to dropdown list" (but thats secondary, probably can add that in somehow, right?) and
    2) even when I just pick PDF/a or PDF/x it starts the process, then tries to open each indd doc but a message comes up saying it can't open the INDD  file(s) and nothing was processed.
    Can someone help me with this?
    Thank you.

    Macinbytes,
    Would you mind walking me through what you are doing?
    In your screen shot, that window looks like the preferences panel, in which you can set your PDF preset, correct?
    Here's what I have been trying.
    File/Create PDF/Batch Create Multiple files.
    Eventually, I get this window. (output options)
    Then when I hit OK, I get this error message saying the files cannot be opened.

  • Open Multiple PDF files from Production order/Routing

    Hi Everyone
    We are in ECC 6.0 environment. We have a scenario where multiple documents were attached to single operation and also at multiple operations. But when I was trying to open these PDF documents, only the last file was getting opened and closing the previous file. How can I open multiple PDF files at one time from Production order or Routing?
    Any help is appreciated.
    Regards
    Prasad

    Hi Prasad,
    from DMS standard I regret but such a functionality is not available. In the standard originals can be opened only one after another.
    I think for realising this functionality an individual modificatoin is necessary.
    Best regards,
    Christoph

  • Unable to open multiple PDF files in Acrobat 9 Pro - Vista

    I have a staff member that is unable to open more than one PDF at a time.  If a PDF is currently open and another one is selected the program will crash and close.  It gives a message stating the program has crashed and must be closed and also gives an option to check online for a solution.  Has anyone else seen this issue or know a fix for it?  Thanks in advance.

    No. Starting with Acrobat 9 it is no longer possible to open multiple PDF files in the same window.

  • Not opening multiple RAW files

    If i open a Raw file in Bridge, it opens up perfectly. Also my jpegs and tiff open in RAW, so no problem there. The problem is, that I cannot open multiple Raw files from Bridge into Raw with the option "open in Camera Raw" So the shortcut cmd+R ( I am on a mac) does not work. It says that Raw has to be opened at least once. I have been using Raw for years now so it has been opened multiple times.
    I Can not seem to find a solution. I would really like to open up multiple edited Raw files at once, and in Raw give the order to rename them into JPEG. If you do that, you see Photoshop CC and a window that says how many convertions are left. So far so good...  but before, I was able to open up some new raw files in Camera Raw without having to wait for Photoshop to convert everything. Now I have to wait for a long time before I can make my new Edits. Can somebody please help me?
    I am using all updated software.
    Ben

    Hello SSPRENGEL,
    Thank you very much for your reply. My apologies for the mess up with RAW and ACR naming.
    The situation is, that I can not open any file with CMd-R. I can open single files with CMD-O. But I need to open multiple files at ones with CMD-R. It used to work good.
    The problem is, That I am in the business of school photography. I take the pictures as RAW files on an Nikon camera (nef) After I ajust all the pictures, I have to rename all of them to JPEG, just to get them online.
    I used to do that with ACR. But now the problem is, if I open a lot of picures with CMD-O, It opens up very good in ACR and I still can give the command to save all of these as JPEG. It workt great, but I have to wait a looooooong time before I can open up my next batch of pictures and start to adjust those. Normally, it would save the files as JPEG and I was able to open up a new batch of pictures in ACR right away. That saves me A LOT OF TIME. This only works if you can open the files with CMS-R. Strange...
    I updated my I-mac to 10.9.1 so I see that is not the newest. PS-CC is 14-2-1 x64 and I am using the beta ACR for now (8.4)
    I just tried to open a RAW file in photoshop with the normal open command and it lauches ACR perfectly. But again from within Adobe bridge I still get the same error about needing to open a qualifying product at least once.
    Stange isn't it?
    Thank you very much for your time!
    Ben

  • How to open multiple sql files in only one ssms instance

    how to open multiple sql files in only one ssms instance, I can't get anything to work that I find online..I hope you can help us.

    I tried opening two files but selecting and hitting enter. it opens one SSMS and two tabs.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How to open an .indd file in commands

    does any one know how to open an .indd file in commands from a plugin(without opening from the normal procedure..File -> Open ...)
    in my plugin I tried,
      SDKFileOpenChooser fileChooser;
    fileChooser.AddAllFiles();
    fileChooser.ShowDialog();
         It shows the dialog window to choose a file. but i don't know what to use that file to be apperead in Indesign application.
    If you have any idea please let me know..

    Here's a sample function I use:
    // Create an OpenDocCmd:
            InterfacePtr<ICommand> openDocCmd(CmdUtils::CreateCommand(/*kOpenDocCmdBoss*/ kOpenFileCmdBoss));
            if (openDocCmd == nil)
                break;
            // Get an IOpenFileCmdData Interface for the OpenDocCmd:
            InterfacePtr<IOpenFileCmdData> openFileData(openDocCmd, IID_IOPENFILECMDDATA);
            if (openFileData == nil)
                break;
            // Set the IOpenFileCmdData Interface’s data:
            openFileData->Set(docSpec, uiFlags, openFlags ,IOpenFileCmdData::kNotUseLockFile);
            // Process the OpenDocCmd:
            error = CmdUtils::ProcessCommand(openDocCmd);
            if (error)
                break;
    // Create a layout window for the new doc:
            InterfacePtr<ICommand> newWinCmd(CmdUtils::CreateCommand(kOpenLayoutCmdBoss));
            newWinCmd->SetItemList(UIDList(*openDocCmd->GetItemList()));       
            error = CmdUtils::ProcessCommand(newWinCmd);
    Make sure of error checks!
    OR Search for SDKLayoutHelper Class Reference

  • How do I open an .indd file on a windows 8 OS?

    how do I open an .indd file on a windows 8 OS?

    You would need to purchase and install Adobe InDesign.

  • Opening multiple movie files to play sequentially.

    Currently, if I highlight several movie (e.g. .avi) files in a Finder window and then double-click on one of them, each of the files is opened in a separate QuickTime window and if I have "automatically play movies when opened" QuickTime preference set, then they all start playing simultaneously!
    How do I change it so that opening multiple movie files results in them being played sequentially in a single window?
    P.S. I have "Open movies in new players" preference is disabled.
    P.P.S. For image files it all works correctly - they are opened in Preview and I get an option of starting a slideshow...

    Hi,
    I'm not on a Mac at the moment to test, but I could have sworn you used to be able to open one movie, pause it and then drag and drop subsequent movies onto that window to append them to the end.
    Give it a try. Sorry if I've been imagining things though

  • I Am Using Photoshop CS5 - I Used To Be Able To Open Multiple SINGLE Files - Now They Over Lap - What Do I Do ¿ - How Can I Reboot My App To My Original Settings ¿

    I Am Using Photoshop CS5 - I Used To Be Able To Open Multiple Single Files - Now They Just Overlap As One File ! - How Can I Fix This Or Reboot My App To My Original Settings ?

    In Preferences UNcheck Open Documents as Tabs

  • Open multiple indd docs through SDK

    Hi guys
    How can I open multiple indesign documents found in a folder chosen
    through a folder chooser?
    I need to open each indesign doc in that folder and do some
    modification on each.
    Here is what I have already written. Now how do I proceed please
    SDKFolderChooser folderChooser;
    folderChooser.SetTitle("Select folder where Indesign Docs are");
    folderChooser.ShowDialog();
    if (!folderChooser.IsChosen())
    break; // cancelled
    IDFile inFolder = folderChooser.GetIDFile();
    PMString inFolderPath = folderChooser.GetPath();
    if (inFolderPath.IsEmpty())
    break;
    //Now open loop through each file and do some processing on each one at a time
    Logically I just have to loop through all the files in that folder,
    open them and do my processing but I just cant find the right snippets
    anywhere. I guess its pretty easy for u guys but am real new at that
    and just cant find any examples anywhere.
    Thanks for your help
    Alicia

    Hi Alicia!
    You can use the FileSystemIterator to go through all the files in a folder. See the paneltreeview sdk sample plug-in for example code for this.
    Basically you probably want something like this:
        PlatformFileSystemIterator iter;
        iter.SetStartingPath(inFolderPath);
        IDFile idFile;
        PMString filter("\\*.indd");
        bool16 hasNext = iter.FindFirstFile(idFile, filter);
        SDKLayoutHelper helper;
        if (FileUtils::DoesFileExist(idFile))
          do
              UIDRef docRef(helper.OpenDocument(idFile));
              ASSERT(docRef);
              helper.OpenLayoutWindow(docRef);
              hasNext = iter.FindNextFile(idFile);
          while (hasNext);
    Good luck!
    Oh, you need to include the actual implementations of PlatformFileSystemIterator and SDKLayoutHelper to your project so they are compiled into the plug-in, as they arent part of the InDesign runtime libs.
    /Andreas

  • Problem with opening a indd file in CC 2014.

    When I'm trying to open a 5.5 .indd-file in CC 2014 on my Windows computer, I get this error message: 'Either the file does not exist or you do not have permission to open it or the file is used by another program'. However my collague has no problem with opening the document on his Mac computer. I guess it has something to do with a kind of setting in my CC 2014. Can anyone help me?

    Nothing to do with ID. It really means what it says - your file permissions are hosed and it being an ID file this could include things like fonts or placed images referenced within it.
    Mylenium

  • Cannot open CC, indd files saved in an earlier versions in CS6

    When attempting to open CC files inside of version CS6 that have been saved by students in version CS4 and later, I get the following message" Cannot open "fileName.indd" because it was saved with a newer version of Adobe  InDesign (CS7.0) You must use tht version or later to open the file... How can I open these files? I also get plugin messages.

    That's weird. But I guess they didn't properly Exported the file into an .idml file. Save As is different from File -> Export to idml
    If your student did just File -> Save As, thinking that Save As works just like MS Word that saving it will work with backward compatibility to a lower version of InDesign then probably it won't work.
    However, just ask them to Re-Export the file to .idml and see if you can open it in your InDesign CS6.

  • InDesign CS 5.5 crashes when opening certain .indd file

    Hi guys our designer reported this issue and I believe it is likely an issue with the .indd file.
    File is found below:
    https://docs.google.com/open?id=0B76oDngKUDCFc25lSEhsZF9EVFU
    Windows 7 64 bit InDesign 7.5.2 CS 5.5. From our tests the file opens, but once we clicked on the file, InDesign crashes 'the following program has stopped working...'. Other .indd files seem to open fine, and this also occurs on our other workstation which is a Mac OS X 10.5 (same InDesign version)
    Would appreciate any assistance/recovery options, as the file is inaccessible to us.

    Won't even open here.
    If you can get it to pen, try exporting to .idml. See Remove minor corruption by exporting
    I don't think it will fix it, but it's less expensive than rebuilding or the Markzware recovery service (Bad InDesign or Quark File Recovery Submission Form) so it's worth a try.

Maybe you are looking for