LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing File Names w/o Reading Data?

Hi All,

I'm trying to get Labview to change the name of files in a directory,
without having to read the data.

I'll have a variety of data sets (text, binary, PDF files, etc), and
would like to rename them.

Any hints? I tried using the "open/create/replace file.vi" by opening
the file, read the file, close it, create a new file, write it, close
it, but it doesn't work. I've also tried "copy" primitive under the
advanced file functions, but only get new directories created with
files in them. The following is what I got when I used it:

For example, the directory “c:\stuff” , will have files
"file1.aaa, file2.BBB and file3.ccc", if I want to rename
“file1.aaa” into the file named "1file.AAA" by using the

"copy" primitive (in the Advanced File Functions), then I get a folder
called "1file.AAA" with the three files, "file1.aaa, file2.BBB and
file3.ccc", in them.

I can manipulate directories, copy files into new ones, but not rename
files.

Kind regards,

-Dorian
0 Kudos
Message 1 of 3
(2,762 Views)
The Move.vi works in NT if your 'moving' to the same directory.
0 Kudos
Message 2 of 3
(2,762 Views)
Spaz wrote in message news:<5065000000050000002C710000-1017707437000@exchange.ni.com>...
> The Move.vi works in NT if your 'moving' to the same directory.

Yes... I figured out what I was doing wrong. Using the "Copy"
primitive, I was including the file name AND path, which was read as a
new folder with the name of the file. If I remove the path, it will
copy the files to the same directory, with the name I wanted.

Thanks!

-Dorian
0 Kudos
Message 3 of 3
(2,762 Views)