Kalle_76 Posted March 9, 2006 Report Share Posted March 9, 2006 Hi All! What is the easiest way to rename a folder using LabView? I have a folder containing files. I need to rename the folder as soon as the software has processed the files. Of course I can copy all files in the folder to a new folder whit a new name and deleting the old folder. As usual, I believe there must be a simpler way to do this but I can Quote Link to comment
Aitor Solar Posted March 9, 2006 Report Share Posted March 9, 2006 You can use "Move" to rename directories, like old MS-DOS. See attached image. Saludos, Aitor Quote Link to comment
Rolf Kalbermatter Posted March 9, 2006 Report Share Posted March 9, 2006 Hi All!What is the easiest way to rename a folder using LabView? I have a folder containing files. I need to rename the folder as soon as the software has processed the files. Of course I can copy all files in the folder to a new folder whit a new name and deleting the old folder. As usual, I believe there must be a simpler way to do this but I can Quote Link to comment
i2dx Posted March 9, 2006 Report Share Posted March 9, 2006 As mentioned Move is the same as Rename. Obvious isn't it if you think about it?And why did you post this in the LabVIEW scripting forum? It is anything but scripting related. Rolf Kalbermatter maybe he thinks of renaming the files, instead of renamig a directory? @entropy Post #2432 maybe this one can help? Quote Link to comment
Mike Ashe Posted March 9, 2006 Report Share Posted March 9, 2006 You could use a shell command node with input: rename <currentfilename> <newfilename> No copying or moving involved. (Obviously don't include the brackets in the file names) Quote Link to comment
Yair Posted March 9, 2006 Report Share Posted March 9, 2006 You could use a shell command node with input:rename <currentfilename> <newfilename> No copying or moving involved. (Obviously don't include the brackets in the file names) I think that to run DOS shell commands in windows XP you need to call cmd.exe with the /c switch or expicitly call the command from the windows "command" folder (and I'm not at all sure that last one will work). Quote Link to comment
PJM_labview Posted March 10, 2006 Report Share Posted March 10, 2006 ...And why did you post this in the LabVIEW scripting forum? It is anything but scripting related. Rolf Kalbermatter I will second Rolf post. If you can't figure out where to post, go post in the LabVIEW general forum! PJM Quote Link to comment
Rolf Kalbermatter Posted March 22, 2006 Report Share Posted March 22, 2006 maybe he thinks of renaming the files, instead of renamig a directory?@entropy Post #2432 maybe this one can help? And what would be the problem with that? Move works both for files and directories. Move is simply the logical combination of Move and Rename into the same function. If a move happens on the same volume, the file data is not moved at all, but just the directory entry is changed. If it is on different volumes, rename would simply fail and move will correctly move the file or directory. This is how the modern OS'es do it at least and the old DOS rename and move functionality are just remainderes of a time when disk management was a lot more complicated and still had to be done partly by the application using it. The according commands in the Command line shell under Windows are simply built on the OS functions and written to emulate the old behaviour eventhough the OS functions underneath would be much more versatile. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.