Delete the file using indesign SDK

I created a new file indd for temporary use, I want to remove it after I'm done.

I can't drop any function to delete the tmp.indd file.

IdFichier tmpDoc;

FileUtils::GetAppLocalCachedDataFolder (& tmpDoc, PMString ("tmp.indd"));

Code of error err = FileUtils::CanOpen (tmpDoc);

If (err! = kSuccess) {}

ErrorUtils::PMSetGlobalErrorCode (err);

return err;

}

SDKLayoutHelper helper;

Status of ErrorCode = helper. SaveDocumentAs (: GetUIDRef (text), tmpDoc, kSuppressUI);

Thank you

Sam

Hi Sam,

IdFichier is derived from AFile which has the Delete member function. Probably, you need to add an include path.

Markus

Tags: InDesign

Similar Questions

  • How to download or upload the file using vim sdk?

    Does vim sdk provides a api to upload or download files to/from the data store?

    VI client provides this functionlaity, so it must be ensured by vim sdk.

    Thank you

    Hello

    There is no API to download the files, RIP vsphere. You can use HTTP put and get, as suggested by William in the post above, to perform the upload/download operations, which are similar to the operations carried out by vSphere Client data store Navigator. You can also see examples of file HTTP which are delivered with the vSphere SDK package, which illustrates the use of HTTP put and get.

    I hope this helps you.

    Thank you

    Angela

  • How can I delete the file on my hard drive RT after getting the file to the PC host using FTP Get file vi?

    I want to get a file on my hard drive of the cRIO to my host PC. I did it by using the FTP Get file vi. After you save this file in my host PC, I want to delete the file on the cRIO. Is there a direct way to transfer the file to the host PC cRIO or do I have to manually delete the file.

    Concerning

    Dude

    Hello

    You must manually delete the file.

    Concerning

    Visuman

  • Cannot delete the file because the file is in use

    So when I'm in a file Explorer window and I want to delete a PDF (for example) I have a "File in use" message.
    I realized that this is caused by the preview pane. No pane preview any message and deletes the file.
    I want to know how I can remove a file with the active preview pane because I want to check the contents to make sure it's the right file, I want to delete?

    Hi Guys - I was reading just return and am surprised that this problem has been dates back to February 2013 with no solutions being provided by MS - it's a real shame to MS support staff and a shame to have a support system that is unable to provide support.

    the solution is use shift + delete which gives you an option to permanently delete, so no need to cut an excerpt or find new no programs etc. installed. Just a SIMPLE SOLUTION.

  • My InDesign Cs5 is currently blocked, while I deleted the file plugins SING. Please, someone help me.

    My InDesign CS5 is suspended, every time I start up my InDesign, I deleted the file plugins, but still his hanging, pls SING, somebody help me. My Photoshop Cs5, Illustrator Cs5 works correctly, but InDesign doesn't work do not.

    Hey, Peter I solved my problem of Bro in some fonts do not support my indesign. So, I took off bad fonts and now its all working properly.

    Thank you Peter for your help.

  • I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think I have

    I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think that's my machine or OS (Win 7 Pro). I have been fighting for three days and am losing patience fast. Advice or assistance will be appreciated.

    I finally got it to work using a different machine and copy the files on a USB stick for transfer to the machine I need installed on!

  • Create the Excel using Indesign javascript file

    Hi all

    We can create csv file using indesign javascript. Is there a way to create excel file using indesign javascript?

    Thanks in advance

    Hi all

    It is a way to generate an Excel from an InDesign table by using a combination of jsx, vbs and applescript.

    Quite a long discussion on that Open with below is a better application of the suggestions here.

    // Exports SIMPLE tables to proper excel file single and double quotes in the table would have to be escaped on the Mac version
    // Does not take Unicode file names
    // with a bit of brain racking can be developed to deal with merged cells and nested tables
    // Pieced together by Trevor (wwww.creative-scripts.com coming soonish) based on the referenced sources
    // Sold AS IS https://forums.adobe.com/thread/1718021
    
    var doc = app.properties.activeDocument && app.activeDocument,
           myTable = myTable || getTable (doc);
    if (!myTable) {alert ("Take a break, needs a document with a table in it!"); exit();};
    var filePath = new File (Folder.temp + "/" + +new Date + ".xlsx"),
        osFilePath = filePath.fsName;
    if ($.os[0] === "M")  osFilePath =  osFilePath.replace(/(.)(\/)/g,"$1:").replace(/\//, "");
    
    exportTable (myTable, osFilePath);
    if (confirm ("Open new excel file")) filePath.execute(false);
     exit()
    function exportTable (myTable, filePath)
        {
            var  numberOfRows = myTable.rows.length,
                   rowNumber, columnNumber,
                   isMac = $.os[0] === "M",
                   rowContents = [],
                   setRange, openMark, closeMark;
    
            if (isMac)
                {
                    setRange = 'set value of range "A';
                    openMark = '" to {';
                    closeMark = '}';
                }
            else
                {
                    setRange = 'app.Range("A';
                    openMark = '") = Array(';
                    closeMark = ')';
                }
    
    for (var z = 0, rowNumber = 0; rowNumber < numberOfRows; rowNumber++) {
        var  numberOfColumns = myTable.rows[rowNumber].columns.length,
                toRange = GetExcelColumnName (numberOfColumns - 1),
                columnContents = [];
         for (columnNumber = 0; columnNumber < numberOfColumns; columnNumber++) {
             var cellContents = myTable.rows[rowNumber].cells.everyItem().contents;
             columnContents  = '"' + cellContents.join('", "') + '"';
         }
        rowContents[rowNumber] = setRange + ++z  + ":"  + toRange+ z + openMark  + columnContents + closeMark;
    }
    
    var tableData = rowContents.join("\n") + "\n";
    
                   if (isMac)
                        {
                            // Thanks Hans https://forums.adobe.com/message/5607799#5607799
                           var myAppleScript =
                            '''set excelRunning to isRunning("Microsoft Excel")
                               tell application "Microsoft Excel"
                               set theWorkbook to make new workbook
                               tell sheet (1) of theWorkbook'''
                               + tableData + '''
                               end tell
                               save workbook as theWorkbook filename "''' + filePath + '''"
                               close active workbook
                               if not excelRunning then tell application "Microsoft Excel" to quit
                               end tell
                               on isRunning(appName)
                                    tell application "System Events" to (name of processes) contains appName
                               end isRunning
                            ''';
                          app.doScript (myAppleScript, ScriptLanguage.APPLESCRIPT_LANGUAGE);
                        }
    
                    else
                        {
                            // Thanks Calos https://forums.adobe.com/message/5607799#5607799
                            // changed by me :-)
                             var vbscript =
                             '''Dim app
                                Set app = CreateObject("Excel.Application")
                                'take away the ' from the line below if you want to see excel do it's stuff
                                'app.visible = true
                                Dim newDoc, sheet
                                Set newDoc = app.Workbooks.Add()
                                Set sheet = newDoc.Worksheets(1)
                                '''
                                + tableData
                                + 'newDoc.SaveAs "' + filePath + '''"
                                app.Quit
                                Set newDoc = nothing
                                Set app = nothing
                              ''';
                            app.doScript (vbscript, ScriptLanguage.VISUAL_BASIC);
                        }
    
                }
    
    function GetExcelColumnName (columnNumber) {// 0 is A 25 is Z 26 is AA etc.
        // parsed from http://stackoverflow.com/questions/181596/how-to-convert-a-column-number-eg-127-into-an-excel-column-eg-aa
         var dividend = columnNumber + 1,
                columnName = "",
                modulo;
    
        while (dividend > 0)  {
            modulo = (dividend - 1) % 26;
            columnName = String.fromCharCode (65 + modulo) + columnName;
            dividend = Math.floor((dividend - modulo) / 26);
        }
        return columnName;
    }
    
    function getTable (doc) { // thanks Marc http://forums.adobe.com/message/6087322#6087322
        if (!doc) return false;
        app.findTextPreferences = null;
        app.findTextPreferences.findWhat = "\x16";
        var tables = doc.findText();
        if (tables.length) return tables[0].parentStory.tables[0];
        return false;
    };
    
  • Cannot delete the file on my Mac

    I feel so frustrated at the moment. It's my computer and my files and sometimes it says I don't have permission to delete or it is used when it is not because it is the first time I have connected the player via an ethernet cable.

    I don't know if he connection via ethernet cable makes a difference. I searched the net and cannot see messages about how to empty the things you cannot delete from the trash. Any help would be appreciated. Thank you

    Sorry, I'll try and be a little more specific. The I'm trying to delete files are video files and projects related to the soft of Adobe. When I try to delete the file, it indicates a specific folder with videos is in service. I did not open this file or folder for more than a year.

  • What is the file deleted the files in the main folder, and can / should I remove it?

    What is the file deleted the files in the main folder, and can / should I remove it? Is it too much room, I could use?

    This file stores a list of files from previous version of Firefox that are no longer needed or supported in the current version of Firefox. This file is only a few KB and it is best not to delete files in the Firefox program folder to avoid update problems. If the required files are missing or modified with a update Firefox will download the full version (approximately 10 MB) instead of a small incremental update which is usually only a few hundred KB.

  • Add, change and delete the file "iTunes" on a NAS

    I have just said "Apple Support Community" by Apple Support.

    The title probably sums up what I'm trying to do. I'm looking for a way to add, change, and delete files on a NAS.

    Hardware: MacBook Pro 15, 1 TB of storage, 16 GB memory, OSX El Capitan.

    NAS: Qnap TS - 453 has: storage nominally 16 TB, up to about 5 TB.  4 WD 4TB disks in a RAID 5 configuration.

    a Vaio WIN10 as well as a smaller MacBook (my wife)

    The purpose of the NAS is to provide a backup system for computers and act a server "iTunes."

    I acquired the NAS after the death of my WD MyBook live in December 2015 after five years of reading backup and "iTunes" to my computer and the Sonos system.

    After two months of 'getting to know you' with the NAS, I finally managed to configure the server "iTunes" and Mirabile Indo-European it works!  I'm just doing the SIN to a back-up for computers.

    Now for the question: I am looking for an app (for lack of a better term) that will allow me to add and remove files to and from the NAS "iTunes" folder

    My search for a solution so far has indicated that:

    (1) NAS' iTunes folder is not really true Apple iTunes and

    (2) I need something that is DAAP (Digital Audio Access Protocol) friendly, that would allow me to add, change and delete the files.that would allow me to add, edit and delete files.

    I'm not looking for something that would synchronize the files iTunes NAS to one of my computers, I am all prepared to do myself if necessary.

    If I can't find an application so I use the app 'Brute Force' change my Mac iTunes required records and download again to my NAS.

    Why do you need an app to put the files in a folder on the NAS Server?  Make them just above in the Finder.  Maybe I'm missing just your problematic here.  Do you mean add your PEMA files to iTunes? I've never used this file format, but kind of, I would be very surprised if iTunes supported it.

    the NAS iTunes folder is not really true Apple iTunes

    I don't understand what you're trying to say here.  "Apple iTunes" is an application. Yes, a folder is not an application.

    Be warned, we see not few messages from people that use iTunes with a NAS. Often the problems cannot be explained. sometimes just iTunes and NAS disagree togther.

  • Pop-up window automatically downloaded a file to my laptop. I deleted the file in my downloads, but how can I be sure I have removed completely?

    Pop-up window automatically downloaded a file to my laptop. I deleted the file in my downloads, but how can I be sure I have removed completely?

    If you know what has been downloaded, I would use EasyFind:

    https://iTunes.Apple.com/us/app/easyfind/id411673888?MT=12

    In addition, I would like to launch Malwarebytes Anti-Malware for Mac:

    https://www.Malwarebytes.org/Mac-download/

    These steps will not guarantee that all items have been reomoved.  This is possible only by backing up your data, erase the HARD drive and then reinstalling the OSX and your data.

    Ciao.

  • Delete the file

    Hi all

    In my vi I used write on the worksheet and read from spreadsheet to create a file or modify the file. Now I want to add a longer IE delete a file.

    Requirement: should I have a combo box, where the list of files, everything I have is listed on. I will keep a button named delete. When I press the button Delete, the file selected in the drop-down list box should be removed.

    How can I do? any idea?

    Attached something to help you get started. If you have any questions or concerns, feel free to ask in this example is simply listed content of a file and stored paths and file names in a key-value pair (by group) and add an option to drop-down list box. When "delete" button, the event fires and deletes the selected file.

  • Can not build an installer, because it seems to have deleted the files required

    LabVIEW does not locate the Installer source of a component necessary to build this installer. LabVIEW finally found the missing element in the following distribution:

    The distribution name: NOR-DAQmx 8.6, disc 1
    Last known installation path: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-1

    Search source for NOR-DAQmx 8.6, disc 1 Setup and build your installer again.

    Visit ni.com/ask support request page to learn more about the resolution of this problem. Use the following as a reference:

    CDK_Build_Invoke.VI.ProxyCaller > CDK_Build_Invoke.vi > CDK_Engine_Main.vi > CDK_Engine_Build.vi > CDK_Engine_PromptForMissingDist.vi

    Loading information of product deployment
    Loading information of product deployment
    Adding files to install
    Makes adding files
    Preparing to build the deployment
    Copy of the products of distributions
    Copy distribution "OR-DAQmx 8.6, disc 2" of: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-2\ to: C:\LabVIEW\DAQ\Pentium4_Loggers\builds\Installers\Data worm 23a\ P4 Logger ".
    Deployment of the completed building

    I think I must have deleted the files required from my C drive.

    (Updated)

    This is now fixed.

    I managed to resolve this, by a combination of download OR-DAQmx 8.6.1 from the Web site of NOR and NOR-DAQmx 8.8 disc installation.

  • Delete the files in the C:\i386\svcpack directory

    I need to free up space on my C: partition, this directory looks like as if it had a good number of files that can offer valuable space, I need

    Hi Yoda-R6,

    Deleting files from the i386 is not recommended, unless you have a genuine Windows XP installation CD. Sometimes the files in c:\i386 (or C:\Windows\ServicePackFile\i386) are needed to replace a damaged operating system file.  It doesn't happen very often, but if this happens to you and you have deleted the files, then you may need to use the Windows XP installation CD to replace the files.

  • Deleting the file in the Temp folder

    I have a file in my TEMP folder called BCGECE. TEMP

    He said: I can not remove it because it is used by another person or program and to close all applications and try again. I have notheing ope, but still can not remove it?

    Suspect A malware.

    What anti-virus application is installed? What's his current subscription? He has never been allowed to expire?
    What other antimalware applications are in use?

    Download, install, update and run full scans with each of the following free tools. Do not run the scans at the same time. Each analysis will take a long time, so start an and then go for a non computer chore.  Leave the delete/quarantine everything it finds. Once completed, you can uninstall these applications.
    MalwareBytes AntiMalware
    SUPERAntiSpyware

    Do a scan with the free eSet online scanner virus

    B. delete the file

    Assuming that the file is not removed by one of the above tools, the following steps work almost always:

    • Close all running applications.
    • Open Task Manager (press CTRL + ALT + DELETE)
    • Open a command prompt window (start > run > cmd > OK)
    • Type the following in the black command prompt window, and then press ENTER after each line
      CD folder
      dir b * (this step is only to list all the files to confirm that you have changed the appropriate directory, make sure that BCGECE.) TEMP is in the list)
    • In Task Manager, find explorer.exe in the processes list, select it, then click on "end process."  Your desktop will become empty except for open windows from the command prompt and the Task Manager
    • Return to the command prompt window and type the following line and press enter
      del BCGECE. TEMP
    • In the Task Manager, click file > new task (run...) and type explorer.exe in the area. Click OK. Your desktop should reappear
    • Close the Task Manager windows command prompt

    If for any reason the foregoing does not, from the start in a "clean boot" configuration XP and delete the file in the usual way.   Use "Method 2" (manual method) to the linked article.

Maybe you are looking for