LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system exec not running copy command

Solved!
Go to solution
Highlighted

Hi,

 

I am trying to copy a file from Windows\System32 folder into my project folder but when I try to do that using copy command in system exec.vi, I get the following error : The system cannot find the file specified.

 

Does anyone know how to resolve this? I have attached the vi here.

 

 

 

 

0 Kudos
Message 1 of 15
(1,698 Views)
Are you sure that the paths are correct and the file is there? What is the path you are using? Are the paths fully specified and not relative or containing variables?

Why are you using system exec to copy files?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."
0 Kudos
Message 2 of 15
(1,678 Views)

And what OS are you using?  I remember reading something recently about trying to put files in the System32 directory does not work directly in new versions of Windows.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 3 of 15
(1,667 Views)

I am also curious why you can't use native LabVIEW code to copy a file.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 15
(1,642 Views)

The file does exist in the system32 folder and the path I entered is also correct. I think the issue is that the file is an .exe file. 

If I use LabVIEW built-in function to copy the file, then also I get the same error message that the file does not exist.

0 Kudos
Message 5 of 15
(1,595 Views)

I am running Window 7 but I am not trying to put anything in System32 directory. I am trying to copy an exe file in System32 dir to some other directory.

0 Kudos
Message 6 of 15
(1,593 Views)

Windows\System32 has many very vital files that Windows needs, so it puts extra protection on it.  If there's a file in there that you want LabVIEW to read, see if you can copy the file (using Windows Explorer) to your "My Documents" folder and try to read it from there.

 

Bob Schor

0 Kudos
Message 7 of 15
(1,578 Views)

I can copy the file from windows explorer and can also copy the file using copy command in commandline but I am not able to copy it using system exec.vi. 

0 Kudos
Message 8 of 15
(1,571 Views)

Create batch file to do the copy.

 

 

0 Kudos
Message 9 of 15
(1,558 Views)

Just for grins and giggles, create a VI that uses the builtin copy node but put controls on both path inputs and Browse to the paths. Is there any difference. Also, are you sure the destination directory is present?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."
0 Kudos
Message 10 of 15
(1,554 Views)