Jump to content

Rename a folder


Recommended Posts

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

Link to comment
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

Link to comment
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?

Link to comment
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).

Link to comment
  • 2 weeks later...
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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.