LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any function in LV 7.1 which renames directories ?

 
0 Kudos
Message 1 of 6
(3,016 Views)
In LabVIEW 7 there is, I'm sure you can find it in version 7.1

function name "Move" see attatchment
-----------------------------
Ayman Mohammad Metwally
Automation Engineer
Egypt - Cairo
0 Kudos
Message 2 of 6
(3,015 Views)
Thank you for your quick answer.
But I tried this already and then the files and subdirectories of the directory will be copied to the new directory and then deleted in the old directory. This could take a long time.
If I rename a directory with the windows explorer it takes just a moment. Therefore I search for a function in LV which behaves like this.

----------------
Thomas Walther
Software Engineer
Germany - Waldbronn
0 Kudos
Message 3 of 6
(3,008 Views)
In the communication pallete you have the System Exec VI, which allows you to run shell commands. You can use it to run the DOS "ren" or "rename" command, but I'm not sure how it will react to DOS commands. Try reading its documentation and see if this helps.

___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(3,003 Views)
If you do a search on this forum for "rename directory" you will find a discussion of renaming directories, with an example (the last respondent) that worked when I just tried it with LabVIEW 7.1.1 on WindowsXP Pro sp 2. It uses a dll call, so it isn't a "native LabVIEW" function, but it appears to work in my limited trials.

Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 6
(2,992 Views)
OK, thanks a lot for the help in this discussion.
The last suggestion using the "rename" function of the "msvcrt.dll" works fine.
Another way I found was to use the "Scripting.FileSystemObject" of the "Windows Script Host Object Model" in the type library.
There is a function called "MoveFolder" which does the same.

All the best for you all
Thomas Walther
0 Kudos
Message 6 of 6
(2,986 Views)