Unable to programmatically rename a file using rename()

I'm using a Javascript that will export as JPG a series of images from an AI file (that part is working fine), then rename them (that part isn't working). Writing and troubleshooting with Extendscript.
Trying to eliminate as many possible places to go wrong, I came up with the following:
myfile = new File; myfile = myfile.openDlg();
var newName = "NEW.ai";
myfile.rename(newName);
When run targeting Illustrator, it does nothing.
When run targeting ExtendScript, for some reason this blasts the file into oblivion, never to be found again.

Hmmm, although I split the creation of a new file object into two steps, I wouldn't expect that to result in the file dissappearing on the rename step. Must be the difference between openDlg and openDialog...ah! According to the Javascript Reference, openDlg() returns an array while openDialog() returns the file.
So I was renaming an array of files (even if there was only one file in the array), but since the old script didn't return an error when it ran (it just disappeared the file), it must have successfully written incomplete name data. I probably have a hidden file somewhere for each time the old script errored.
Mark, it's always wonderful to learn something from you.

Similar Messages

  • Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before down

    Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before downloading the new Reader version. Suggestions? Thank you.

    Hi,
    Which version of Adobe Reader were you using earlier when printing using Dell printed was working fine?
    Thanks,
    Shakti K

  • Unable to load/play sound files using SoundEngine_LoadEffect

    Hi All,
    I am able to load/play sound files using SoundEngine_LoadBackgroundMusicTrack but unable to load/play sound files using SoundEngine_LoadEffect on iPhone Simulator. I am using the SoundEngine.h/cpp from Crash Landing. Oddly enough sound effects load and play succesffully when i start the app with 'Start with Performance Tool'. Does anyone know what is actually going on.
    Also i would like to know what is the difference between playing sound files using these two methods. What are the restrictions on individual sound file types for each method.
    Thanks

    I was able to load/run the sound effects after using Simulator - iPhoneOS 2.1 in the Active Target/Build drop down on Xcode toolbar. Both Active SDK, and Active Executable should be 2.1 in order to play the sound effects.

  • Unable to see the uploaded file using gos object

    Hi Experts,
    I uploaded the file to server by using the below code. But I am unable to see the uploaded file. Please help me out hot to view the uploaded files (list the file name and view the content) (i want to upload the file by getting the url as input and by clicking the button)
    Code to upload the file.
    DATA: wa_zqtc_gos_request TYPE zqtc_gos_request.
      DATA: l_attachment        TYPE swo_typeid.
      DATA: lo_gos_service      TYPE REF TO cl_gos_document_service.
      obj-objkey  = req_num.
      obj-objtype = objtype.
      CREATE OBJECT lo_gos_service.
      CALL METHOD lo_gos_service->create_attachment
        EXPORTING
          is_object     = obj
        IMPORTING
          ep_attachment = l_attachment.
    I tyied with this to view the files but the attachement link is disabled. (i want to view the files by clicking the icon-GOS icon in tool bar)
      DATA: wa_zqtc_gos_request TYPE zqtc_gos_request.
      DATA: l_attachment        TYPE swo_typeid.
      DATA: lo_gos_service      TYPE REF TO cl_gos_document_service.
      obj-objtype = objtype.
      obj-objkey = req_num.
      CREATE OBJECT manager
        EXPORTING
          is_object = obj
        EXCEPTIONS
          OTHERS    = 1.
    Please help me out how to view the file and list.
    thanks & regards
    T.Tamodarane
    Edited by: T.Tamodarane on Oct 23, 2009 9:55 AM
    Edited by: T.Tamodarane on Oct 23, 2009 9:56 AM

    Hi,
    Please post ur thred below:
    PL/SQL
    Regards
    Meher Irk

  • Unable to see D800 raw files - using Lightroom 3.6 & CS4

    Hi,
    I have just purchased a Nikon D800 and I am unable to see the .NEF files within either Lightroom 3.6 or CS4. Can anyone help me? I have read on other forums that you need to install ACR6.7 but those users were all using newer versions of software.  I have downloaded ACR 6.7 - are my programme versions compatible and will LR & Bridge pick up the new version automaticaaly or do I need to do anything? I am running Windows 7.
    I'm not sure if this will make any difference but within my camera menu I chose NEF (RAW) recording to be Lossless Compressed.
    Thanks
    Jo

    ACR 6.7 can only be used with PS CS5. You will have to use one of the following options.
    1. Use the latest Adobe DNG converter 6.7 to convert your .NEF files to dng (retain a copy of the .NEF's) then you can import into LR 3.6.
    2. Consider upgrading to LR 4, you can download the LR 4.1 RC2 and run for the trial period untill the Final LR 4.1 is released.

  • Unable to test MPEG-4 files using fmscheck.exe

    I am trying to run fmscheck.exe to test server status
    i am using bat file with code:
    set /A counter = 0
    :start
    start /B fmscheck.exe --host localhost --app vod --play sample 0 all --timeout 360 --logfile output_log.txt
    set /A counter = %counter% + 1
    IF %counter% LEQ 9 goto :start
    I have sample.flv and sample1_1500kbps.mpeg-4 file in my application\vod\media folder.
    When i run sample file using code given above it runs successfully
    But when i input
    start /B fmscheck.exe --host localhost --app vod --play sample1_1500kbps 0 all --timeout 360 --logfile output_log.txt
    it gives error: File NOT found
    I tried this command:
    start /B fmscheck.exe --host localhost --app vod --play mp4:sample1_1500kbps 0 all --timeout 360 --logfile output_log.txt
    it gives error: File NOT found
    What is the problem here?

    I was making a mistake.
    Correct command  is
    start /B fmscheck.exe --host localhost --app vod --play mp4:sample1_1500kbps.f4v 0 all --timeout 360 --logfile output_log.txt
    thanks.

  • Unable to create a pdf file using the print routine

    Hey all,
    Recently, i've been unable to create a pdf using the print routine from quickbooks, word, outlook, etc... using the print routine and the adobe pdf driver....
    I have vista and cs3... Any thoughts?
    Thanks,
    Murph
    [email address deleted by host]

    If you are trying to print to the Adobe PDF printer and that fails, try using print-to-file. Then open the file in Distiller. If the result is the desired PDF, then check for AcroTray running as a background application. Sometimes it has to be restarted, but should be in your startup (you can check msconfig from the start>run menu to see if AcroTray is there).

  • Unable to programmatically delete keystore file

    Hi
    I'm in the process of writing some junit tests for a Key Management helper class. What I want to do is initialise an empty keystore in setUp, add keys, get keys, delete keys, etc in the testXXX methods and delete the keystore file in tearDown. My tearDown looks like the following but is always failing as f.delete() is returning false (i.e. keystore file was not deleted).
         public void tearDown() {
              File f = new File(JUNIT_KEYSTORE);
              if(f.exists()) {
                   if(f.delete() == false) {
                        fail("Unable to delete " + JUNIT_KEYSTORE);
              assertFalse(JUNIT_KEYSTORE + " exists.", new File(JUNIT_KEYSTORE).exists());
         }I'm working on WinXP with 1.4.1_06. When viewing the keystore file properties via explorer it is writeable, and I can delete the file manually. Also I can programatically delete other files, just not keystore files. My suspicion is that since the keystore is seen as such a sensitive and valuable resource that the java security model may be placing some restrictions on what operations can be performed on it through the File class API. However being a relative java.security novice, I would be grateful if someone more enlightened could provide some insight?
    Thanks in advance
    Rob

    Hi
    Adding the following lines to tearDown() indicates that the java security model is indeed preventing the keystore file from being deleted as an AccessControlException is being thrown. Note read and write are also blocked.
         FilePermission delete = new FilePermission(JUNIT_KEYSTORE, "delete");
         AccessController.checkPermission(delete);Next question : Is it possible to programmatically enable the 'delete' FilePermission? or can this only be done by adding a suitable entry to java.policy?
    Rob

  • Unable to print a PDF file using the BI Publishing server

    Hi,
    I have a BI publisher server version 10.1.3.4.2 on W2K3 43 bit.
    I can access through the url that server.
    From my desktop I access through an url my Oracle APEX application.
    It has been configures with:
    Report Printing:
    Print Server Protocol: Advanced (requires Oracle BI Publisher)
    Print Server Protocol: HTTP
    Print Server Host Address: the IP address of my BI Publisher server
    Print Server POrt: 9704 (from instllation of BI)
    Print Server Script: /xmlpserver/convert
    On the page I want to print, it is configured with:
    Download:
    PDF option is checked.
    When I click on Action -> Download -> PDF for this page, I get the error:
    <file>. pdf file can not be opened because the file type is not supported or because it is damaged (because, for example as an e-mail attachment is not sent and correctly decoded)
    Does someone has an idea what the problem is and where I should investigate further?
    Thanks by advance for tips.
    Kind Regards.

    If you are trying to print to the Adobe PDF printer and that fails, try using print-to-file. Then open the file in Distiller. If the result is the desired PDF, then check for AcroTray running as a background application. Sometimes it has to be restarted, but should be in your startup (you can check msconfig from the start>run menu to see if AcroTray is there).

  • Unable to open newly created files using a specific font.

    Hello everyone!
    All of a sudden, I am not able to open newly created files in Acrobat Pro 9.0 that use a specific font. It seems to be localized to files that are created in Microsoft Words, as I tried to create a document in Pages and was able to open that PDF (using the same font) in Acrobat. I'm not sure what to do at this point...Any ideas?

    Hi,
    If you have recently upgraded to Mac OS X 10.6.7, then have a look here:http://forums.adobe.com/message/3593533#3593533, where Steve Werner had the solution.
    Niall

  • Missing Plugins.  Unable to open InDesign CS4 file, using CS3.

    There are various updates InDesign CS3 available;
    Adobe InDesign 5.0.2, 5.0.3, and 5.0.4.dmg etc, plus 'Digital Editions'.
    Which one provides correct plugins to allow opening of a CS4 originated file in CS3?
    Alternatively, is there a link which provides a utility which will automatically detect which
    plugins you require to update from CS3>CS4?
    Thanks very much.

    My script in this thread: http://forums.adobe.com/message/4071273 will identify with what version of ID a file is created, which may be helpful at times. (Aside, you may be the first to try it with CS3 -- so it might not work.)
    Nothing to be ashamed of on your side, really. That infernally misleading "upgrade your plugins" 'error' dialog has been confusing first-time users from the very first time some lazy programmer at Adobe opted for a quick shortcut in programming and be at home before rush hour.

  • Unable to create post script file in framemaker.

              I installed TCS 4.0 licensed suite. Due to some reason I need to delete Adobe PDF from Devices and Printers. Since then I am unable to create post script file using framemaker. I have tried uninstalling and installing TCS 4.0 again, but all in vain. What should I do now?

    If you delete critical parts of Acrobat there will be problems. Try doing a REPAIR of Acrobat Pro (from the Programs Control Panel), maybe it can undo the damage.

  • Unable to save or download files, already tried suggested options

    I'm not the most tech-savvy creature on the planet, so bear with me.
    For a while now, I've been unable to save or download files using Firefox. IE isn't working either, but I only initially used IE on this computer to download Firefox anyway. I've tried the [http://support.mozilla.com/en-US/kb/Unable%20to%20download%20or%20save%20files suggested options].
    I'm not incapable of downloading though - Steam and the Blizzard launcher are still working as always. AVG's updating download, hoever, doesn't appear to work. On occasion, I have been able to download things - VLC Media Player and seldomly an item I attempt to download will successfully be saved. It's so infrequent and unpredictable though, that I can't reliably find out what's allowing me to do so. Needless to say, since my virus and spyware scanners appear to be borked, I'm more than a touch worried and unable to download any suggested alternatives.
    When downloading a file, it will briefly appear in the location I saved it to before vanishing. I ask now because my computer's performance has seriously dropped within the last month or so, and I'm not convinced I'll be able to sort it out while I'm so thoroughly grounded without downloads.
    Thanks in advance.

    Hi there, I've had a java problem ever since i removed an old version thinking that i didnt need it because i had newer versions, well, i've learned alot since then, but unfortunately not enough. I play an online game called runescape. For one month now, i've been searching up on google, EVERYWHERE, trying to find help so i can play my game again.
    I get up to a point where the game loads the game script, and on 100% comes up with an error "Error_loader_savefile - Unable to save to cache". I've tried everything, i've installed almost all of the java versions, I've been through environment variable settings and made sure that the PATH is pointing to a version of java, What can i do, im desperate for help, please post back. CHEERS

  • Unable to download a pdf file. received message-problem with program with acrobat reader-103-103

    unable to download a pdf file using acrobat reader X. received message-there is a proble with program with acrobat reader 103-103.

    Download the file with your web browser (Safari, Firefox, Chrome). Then attempt to open the PDF file in Reader or Acrobat.
    It may not be a real PDF file, or it may be damaged.

  • Programmatically rename a .xml file in labview.

    “ I am trying to programmatically rename a .xml file in labview. The program uses the “Move” function, but generates an error. I suspect this is because the “Move” function only works for certain file extensions. My guess is that “Move” actually opens the file; reads its contents; then copies it to another location. Now, because LabVIEW struggles with .xml files, “Move” is unable to work. Any solutions to this problem? Thanks in advance.

    SansaHassim wrote:
    “ I am trying to programmatically rename a .xml file in labview. The program uses the “Move” function, but generates an error. I suspect this is because the “Move” function only works for certain file extensions. My guess is that “Move” actually opens the file; reads its contents; then copies it to another location. Now, because LabVIEW struggles with .xml files, “Move” is unable to work. Any solutions to this problem? Thanks in advance.
    An xml file is a text file so I don't think it is because of the file type. Do not have write permission for the file or directory that you specify in target path? Have you tried moving it to another directory like your desktop? If this works then you would be sure it's not cause by the filetype.
    Ben64

Maybe you are looking for

  • Jsp form help

    Hello everyone out there' I am a computer science teacher in a private high school in Nigeria and have some experience in java programming language and also new to the JSP tech .I want to introduce the school into using web applications in managing t

  • Main Server crashed. Currently using AD that exist in a desktop computer with Sever 2008 R2 Standard installed. Need to copy the AD to the main server. All in same IP range.

    Hi Guys, Unfortunately the main server crashed and I have re-installed Server 2008 R2 Standard in it. The server had only ADDS, DNS Services and File Services. I have the AD on a desktop computer where Server 2008 R2 Standard is installed. All the us

  • M451dn disconnects randomly

    Greetings! I have two printers over here, both M451dn's. One of the M451's will disconnect randomly from the computer. It does not disconnect completely, leaving the M451dn's printer object faded. Instead it creates a new "unknown device" and refuses

  • How can I get Mail to 'forget' old email addresses?

    Several work contacts have recently changed their email addresses, but when I type their names in the To: box in Mail, it brings up both the new and old addresses. None of these email addresses are in my Address Book, Mail is obviously just picking t

  • String tokenizer manipulation

    Hi, I would like to ask how to manipulate the token that are taken from string tokenizer. For example : input = a b 1 f 986 supposed output: a b 1 f 986 How to make the output look like this? Output = (a,b,f),(1,986) How to make the program will be a