Problems in rename folder using CVI

Hi, I am just using "rename" function to rename my folder name. Normally this function goes well.
However, if user already opens a files in the folder(maybe sub-folder) using some other program, this rename will always cause a run-time error.
How can I avoid this?
Thanks in advance
Gavin

This is an error raised from the OS and not dependent from CVI; you can receive the same error even in Explorer (but only if the file is opened for modifications) and depends on the fact that the OS may come into trouble while saving a file after folder rename, so it forbids it.
I suppose the only resource you have is to warn the user to close the file before your program can continue.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • Renaming OCS Folder using webservices API

    Hi,
    Will it be possible to rename OCS Folder using webservices API?..
    Thanks,

    This is resolved by using, FileManager.updateFolder()

  • Can't open or rename folder... but not a permission issue

    This one has me puzzled, and I can't figure it.
    I have a fair background in unix and command line interfaces, so I've tried all of the usual fixes with chmod, chown, chgrp and everything else I can throw at it without luck.  It's not a locked/hidden file, and it doesn't have any extended attributes.  Tried repairing permissions.  No luck.  Drive verifies OK.
    The problem folder (one of many) came from an Active Directory mount via my network at my office.  On the server (and on the folder when I copy to my desktop), the folder is a pale, light-blue colour and can't be opened or modified from the finder.
    I can use a terminal window to get into the folder and access it via command line (works fine).  Can move and rename it via terminal (again, no problem), but always light-blue and can't do anything with it from the Finder.  Opening with "Get Info" shows that I own the file, and that I have read/write permission (and not locked).
    Even if I copy the folder to a FAT32 USB stick, it exhibits the same behaviour where I can't open or modify it.  There is no problem accessing the folder on a PC.  If I duplicate the folder on a PC, the duplicated folder works fine in the finder, and is normal (however the original is light blue and can't be changed).
    Totally stumped.  Anyone have ideas?

    What version of the software is this? Did you update it?

  • A litle problem with rename method.

    Hi everybody..
    I have a little problem with renaming files..
    I can rename files but it puts the new renamed files to BIN directory (where my program runs) whereever the path I opened the old-original image. I want to pu the "renamed file" where it belongs to,the orginal path, How can I handle with it?
    My code is like this..
    String renamestring = JOptionPane.showInputDialog ("Enter new name for image");
    File file2=new File(renamestring+".gif");
    boolean success = f.renameTo(file2);
    I have another question if you do not mind..How can I rename files with their orginal extensions?? for example in the above code ı rename all file with .gif extension, (if I Dont do that, it does not give any extension to the new renamed file..)
    thanks so much..

    Now, I'm a bit shaky on files, I've only used them to store dummy data, but here's my two cents.
    It's putting the files there because, as it appears from what you've cited as your code, you're using a relative filename. something like pic1.gif. This will be put whereever the program is running. What you want is to make your file using...
    String PATH_NAME = "<Directory you want it stored in>";
    File file2=new File(PATH_NAME + renamestring + ".gif");There are a few ways of getting where it should be saved, but since I'm not sure what system you're on, I'm not going to go into it. Simply put, I think you can just search from the back to the String (originalFile.getPath()) for the last folder deliminator (i.e. "\"), then take that and everything before it as the PATH_NAME.
    As for original extension, you can try the same thing. Start at the end of the file name using the String's lastIndexOf() function, and find the period. Then take the period and everything until the end of the string as a new String fileExtension.
    String PATH_NAME = "<Directory you want it stored in>";
    File file2=new File(PATH_NAME + renamestring + fileExtension);

  • Missing export kernel32.dll when using cvi 9.0 on win 64

    Hi,
    I just have a new computer (windows 7 64 bits) : PC 1 for short.
    My old computer was a windows xp 32 bits : PC 2.
    I compile my programs with CVI 9.0.
    When I compile a program with PC 1 :
    - the install works on PC 1 & PC 2
    - the prog installed works on PC 1
    - the prog installed doesn't work on PC 2 : Missing export ...... from 'KERNEL32.DLL'
    Somebody has an idea?
    Solved!
    Go to Solution.

    Hi,
    if your program uses some functions from Windows SDK included in kernel32.dll, the program really depends on this library.
    The problem is that for this reason CVI includes kernel32.dll when you build a distribution kit (on the target PCs you should find a copy of kernel32.dll in a subfolder of the one where you installed your application).
    The problem is that CVI takes this dll from your development PC (Win 7) and your target PC (XP) can't work with this dll. Win XP has its own copy of kernel32.dll, but MS Windows Operating Systems load dlls from application folder before than from system folder.
    And so, simply remove the kernel32.dll dependency and rebuild the distribution kit.
    This is a general behavior of CVI and can bring to several problems. I've already reported this to NI, because Operating System dlls must not be included in a distribution kit. If the target OS lacks of some core dll, this is a severe problem, and it's not a situation that CVI can fix simply using some local copies of these dlls.
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • Can't save files to Last Folder Used

    I'm scanning items with a Kodak iQsmart3, running under Kodak's oXYgen 2.6.1 scan application. Late last week, the application suddenly stopped saving files to the last folder used. Now I have to re-select the destination folder for each scan.
    I have rebooted the computer several times, and have also re-installed the scan application, but nothing helps the problem. It seems now that the problem may be with OS 10.4.11. I've searched and searched for a solution within the OS, but can't find anything that helps.
    Does anyone have a suggestion on how to proceed? Is there a place where you can check to see if the saving options can be changed?

    Thanks for your suggestion. However, I did as you advised and still cannot save files to the last folder used, as I used to be able to do.
    This is the first time in the 2 1/2 years I've been using this system that I've had any trouble with it. When I opened Disk Utility, it showed me the size and type of three different drives, all identical in manufacture. The first holds the Operating system, and the other two are set up in a Raid Striped set. I selected Macintosh HD under the name of the first drive, since that's the name of the disk on my desktop, and ran the Repair Permissions function, moving the recentitems.plist file to the desktop and rebooting, as per your instructions. Was that the proper area to use or should I have selected the disk description above that?
    (Below is the disk information from the Disk Utility application)
    Disk Description : Hitachi HDS725050KLA360 Media Total Capacity : 465.8 GB (500,107,862,016 Bytes)
    Connection Bus : Serial ATA 2 Write Status : Read/Write
    Connection Type : Internal S.M.A.R.T. Status : Verified
    Connection ID : "Bay 1" Partition Scheme : GUID Partition Table
    (Below is the information on the Macintosh HD folder of that drive.)
    Mount Point : / Capacity : 465.4 GB (499,763,888,128 Bytes)
    Format : Mac OS Extended (Journaled) Available : 226.2 GB (242,855,989,248 Bytes)
    Owners Enabled : Yes Used : 239.3 GB (256,907,898,880 Bytes)
    Number of Folders : 133,296 Number of Files : 684,567

  • When i go to 'New Folder' the name box only opens for a second so I dont have time to name it correctly. Rename Folder does the same thing - any thoughts??

    when i go to 'New Folder' in outlook the name box only opens for a second so I don't have time to name it correctly. Rename Folder does the same thing. Any thoughts? Many thanks.

    Hi Clint,
    Did you get a reply from anyone for this problem?  I'm having the same problem and wondering what the resolution might be.
    Thanks

  • Bookmarks saved to a uniquely named bookmarks "folder" using "Bookmark All Tabs" not exporting.

    I used the Bookmark All Tabs feature to save a group of bookmarks into bookmark "folders". I did that by right-clicking on one of the tabs, choosing "Bookmark All Tabs". For "Folder Name" I entered "Watches". The default entry in the "Folder" field was "Bookmarks Menu", which I did not change. When I look at my list of bookmarks there is a separate "folder" named "Watches" that contains all the bookmarks I saved. So far so good. The problem came when I used "Export Bookmarks to HTML..." When I opened the "bookmarks" folder I noticed that the name "Watches" appeared on the page, but none of the actual "Watches" bookmarks were there. I thought that maybe they were contained somewhere within the bookmarks file, but I just could not see them. However, after I imported the bookmarks into IE none of the "Watches" bookmarks were there.
    Why are the "Watches" bookmarks not included within the exported "bookmarks" file? I've searched Google but haven't seen where anyone else has mentioned this problem.
    Incidentally, I have other bookmarks I've saved the same way (i.e., "Bookmark All Tabs"), and none of them are being exported either. Also, doing the export with all add-ons disabled made no difference.
    Thanks.

    Problems with bookmarks and history not working properly can be caused by a corrupted places.sqlite database file.
    You can check for problems with the places.sqlite database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file

  • When attempting to use Lightroom external editor program to edit a photo in Photoshop Elements 10, the photo does not open / appear on photoshop elements screen.  I don't have any problem with this when using Photoshop Elements 6 or Photoshop CS.  I'm usi

    When attempting to use Lightroom external editor program to edit a photo in Photoshop Elements 10, the photo does not open / appear on photoshop elements screen.  I don't have any problem with this when using Photoshop Elements 6 or Photoshop CS.  I'm using a Mac with Mountain Lion OS.  Any solutions?

    Adobe now hides the editor - what looks like it is not - you want the editor hidden in the support folder - see http://forums.adobe.com/message/3955558#3955558 for details
    LN

  • Problem in delete folder

    Please don't refer me to the innumeras delete folder solutions available in the SDN. None of them has come to my help.
    I need to delete a folder. Well, codes are available everywhere, I run it, it successfully deletes the folder specified.
    But the requirement is, I need to make a zip of the folder, then I'll delete the original folder. I am pasting the code here. The zip part is working, the delete part is not! if you comment the line calling zip, it deletes the folder, but after zipping, it cannot delete.
    Is there some lock present? How to check and remove that? Please help.
    * Created on Jan 16, 2006
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.ibm.eis.printapi;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintStream;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    * @author localusr
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    class PrintUtils {
         static String folderName = "EISMENU_bak";
         static String path = "c:\\samik";
         static String outFilename = "outfile.zip";
         public static void main(String args[]) throws IOException {
              File inFileName = new File(path + "\\" + folderName);
              //make the zip file
              makeZip(inFileName, path, outFilename);
              //Now, delete the directory
              File inFileName2 = new File(path + "\\" + folderName);
              inFileName2.renameTo(new File(path + "\\" + "aaa"));
              deleteDir(inFileName2);
         public static void makeZip(File inFile, String path, String outFile) throws IOException {
              File[] filenames = inFile.listFiles();
              byte b[] = new byte[512];
              ZipOutputStream out = null;
              try {
                   out = new ZipOutputStream(new FileOutputStream(path + "\\" + outFilename));
                   for (int i = 0; i < filenames.length; i++) {
                        if (filenames.isFile()) {
                             InputStream in = new FileInputStream(filenames[i]);
                             ZipEntry e = new ZipEntry(filenames[i].toString().replace(File.separatorChar, '/'));
                             out.putNextEntry(e);
                             int len = 0;
                             while ((len = in.read(b)) != -1) {
                                  out.write(b, 0, len);
                             print(e);
              } catch (IOException ioe) {
                        ioe.printStackTrace();
              } finally {
                   out.close();
                   out = null;
                   filenames = null;
                   b = null;
         public static void print(ZipEntry e) {
              PrintStream sop = System.out;
              sop.print("added " + e.getName());
              if (e.getMethod() == ZipEntry.DEFLATED) {
                   long size = e.getSize();
                   if (size > 0) {
                        long csize = e.getCompressedSize();
                        long ratio = ((size - csize) * 100) / size;
                        sop.println(" (deflated " + ratio + "%)");
                   } else {
                        sop.println(" (deflated 0%)");
              } else {
                   sop.println(" (stored 0%)");
         public static boolean deleteDir(File dir) {
              boolean deleted = false;
              try {
                   if (dir.isDirectory()) {
                        String[] children = dir.list();
                        for (int i = 0; i < children.length; i++) {
                             boolean success = deleteDir(new File(dir, children[i]));
                             if (!success) {
                                  deleted = false;
                             } else {
                                  deleted=true;
                   // The directory is now empty so delete it
                   //System.out.println(dir.canRead())
                   deleted = dir.delete();
              } catch (Exception e) {
                   System.out.println("error: " + e);
              return deleted;

    Thanks it worked.
    The problem was, the folder I was trying to delete had .classpath, .project, .websettings files. It was encountering problem to delete these files because it internally also uses files of same name.
    May be that was the reason.
    I tried with any other folder, it worked.

  • Problem when try to use 2 computers

    Hello there.
    I'm now facing a problem when try to use 2 computers. Specifically, I downloaded my ebook (pdf form) in my laptop and open it without problems. But when I tried to reopen the same book (from human kinetics site) to my pc, the known message revealed ("E_LIC_ALREADY" etc etc).
    As I realised, in my laptop, the ADE wasn't authorized (in fact, "is authorized without an ID"). I tried but didn't achieve to authorize it (it's not accepting my username and password, saying that the specific ID is already used, obviously when I made the similar procedure on my pc, a year ago), whereas I'm also not able to re-open the book in my pc (I made copy-paste to the appropriate folder of my pc, by the way...). What's the solution in this case? I mean, it's very annoying for me and I desperately want to solve it...
    Thank you in advance,
    Nikolas

    Answer 1 : Really not quite sure about this ....
    Answer 2 : turn the card upside down and check the model number .. the model number would be WPC54G and if there v2/v3/v4 after it it means that the card is version 1 ....
    Answer 3: As you windows xp , go to start >> programs >> uninstall wireless notebook adapter.... insert the CD for the adapter ...take the card out and insert it back again.... follow the instructions on the found new hardware wizard ... this will install the drivers for the adapter and then you can use the windows wireless configuration utility to connect to the wireless network ....

  • Directory structure in trash folder using cmsdk

    Hello forum community!
    We are using cmsdk to manage files online and have a problem with trash folder . If someone deletes whole directory, all structures are gone (only “flat files” are shown in trash) .Is there a possibility to show whole directory structures in the trash folder?
    Is this a configuration promlem ?
    regards,
    krystian

    Hello,
    Yes I mean the deleted Document.
    Let’s say I have a workspace with 3 folders (folder1, folder2, folder3). In every folder there are 3 docs folder1_doc1.doc, folder1_doc2.doc, in folder2 folder2_doc1.doc ...
    Now I delete folder1. I see in the trash of the workspace just the deleted files (folder1_doc1.doc...) without directory structure.
    What I want is to have a possibility do recover whole directory structure (folder1 including folder1_doc1.doc...).
    I hope it's clear now :-)
    Regards
    Krystian

  • Problem with rename command in ftp_command

    hi all ,
    i am facing a problem in renaming a file by rename command...
    this is how i am calling the fm ftp_command
    CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = g_handle
          command       = 'RENAME l_templine_file l_templine_file1'
        TABLES
          data          = l_i_temp_line
        EXCEPTIONS
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
    here l_templine_file   - dev00227.header.tmp  
    l_templine_file1 - dev00227.header.txt
    the fm is failing that the error meassage is FTP subcommand  error
    can u suggest where i am going wrong in this...

    hi,
    May be the command you are passing is incorrect syntax..
    Pass the values like this..
    l_templine_file =  'c:\dev00227.header.tmp' " this should be with path'
    l_templine_file1 = 'dev00227.header.txt'" this is just the name of file
    If not worked..then Try writing in small letters//
    write
    command = 'rename l_templinefile l_templine1'.
    rewards if useful
    Hope this solves..
    regards,
    nazeer
    Message was edited by:
            nazeer shaik
    Message was edited by:
            nazeer shaik
    Message was edited by:
            nazeer shaik

  • Questions from a beg.  CF,HTML,  Renaming folder/path and adding main page.

    Questions from a beg. CF,HTML, Renaming folder/path and
    adding main page.
    Hello I have inherited this new job and I am trying to
    understand it asap. I am a complete beginner to html,CF and web
    development overall
    Yes I grabbed some books, but if you can help me. I really
    appreciate is.
    I have this file structure
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    Here you find a MyReport folder
    And find 2 .cfm
    1. Index
    2. version.cfm
    I have 2 BIG questions, ok 3
    HOW DO YOU MAKE A PAGE THAT WILL CONTAIN
    The link of this MyReport.
    A main page. In other words.
    Main page that has a text Main report
    For name of the division_
    Then a link called My reports. And Your report
    Prefereably sorted
    · My reports.
    · Your report
    HOW DO I CHANGE THE FOLDER
    FROM
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    TO
    Z:\NewExport\repmining\myreport
    Then point to it
    http://myserver/ repmining\myreport
    WHY IS THE REPDOCS NOT TYPED IN THE BROWSER WHEN VIEWING THE
    MYREPORT.( i dont have to type (repdocs)to view the report?)
    in other words:
    Z:\ToExport\RepDocs\MyReport
    Is typed
    http://myserver/Myreport/
    without repdocs.
    Please excuse me.
    I am a real beginner.
    Thanks .
    Hope someone replies soon.
    Take care.

    OK, I think I understand your questions, so here goes:
    quote:
    HOW DO YOU MAKE A PAGE THAT WILL CONTAIN
    The link of this MyReport.
    Simply have a link on a page, ex:
    <a href ="LINK URL">LINK TEXT</a>,
    As for your question on your reports, I do not understand
    what you are asking
    quote:
    HOW DO I CHANGE THE FOLDER
    FROM
    Z:\ToExport\RepDocs\MyReport
    Pointing to it
    http://myserver/Myreport/
    TO
    Z:\NewExport\repmining\myreport
    Then point to it
    http://myserver/ repmining\myreport
    If you are directly connected to the server, just create a
    folder in (from what it looks like) Z:\ToExport\RepDocs\ that is
    the new folwer name, ex:
    Z:\ToExport\RepDocs\NEW_folder and put files into it. If you
    are now directly connected to the server, use a program like FTP
    server to connect via FTP and do the same.
    quote:
    WHY IS THE REPDOCS NOT TYPED IN THE BROWSER WHEN VIEWING THE
    MYREPORT.( i dont have to type (repdocs)to view the report?)
    in other words:
    Z:\ToExport\RepDocs\MyReport
    Is typed
    http://myserver/Myreport/
    this is simply because
    http://myserver/Myreport/ is
    set to point at the folder Z:\ToExport\RepDocs\MyReport therefore
    it looks like
    http://myserver is set to the folder
    Z:\ToExport\RepDocs\ anything you add into a folder after that will
    be included.
    I hop eI answered some of your questions

Maybe you are looking for