LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CopyFile fails when filename has multiple dots (eg. c:\aa.bb.cc). Help!

Hi,
CopyFile fails when filename has multiple dots (eg. c:\aa.bb.cc). It copies the file but truncates the last part. Help!
 
Thanks.
0 Kudos
Message 1 of 4
(3,272 Views)

I could not duplicate this.

I used the line below to make a copy and the file copied correctly.

CopyFile("Passwords.new.txt", "Tempjunk.del");

The file was in its enitirety and the new filename was correct.

How are you trying to use it?  What exactly are you referring to that got truncated?  The file Name?

0 Kudos
Message 2 of 4
(3,264 Views)
Hi,
CopyFile("C:\abc.d.e", "C:\tmp"); /* fails. the new file that is copied is C:\tmp\abc.d. The last part is missing*/
 
However if I do
CopyFile("C:\abc.d.e", "C:\abc.d.e") /* WORKS! */
 
Moral of story: "He who does not fully specify destination file, lives dangerously" 🙂
 
 
0 Kudos
Message 3 of 4
(3,249 Views)

Hi gruvee,

I'm glad that there is a satisfactory workaround!  Just so you know, this problem was identified and reported to R&D.  It has been fixed in CVI 8.0.  I am assuming you are using 7.1 or previous so please let me know if you are using 8.0 and are still seeing this behavior 🙂

Thanks for letting us know about the problem.
Megan B.
National Instruments

0 Kudos
Message 4 of 4
(3,228 Views)