LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

xcopy without a command window....

Solved!
Go to solution

Hi,

 

I need to download from the network a folder, not always the same folder as this will hopefully be pragmatically controlled, along with its sub folders, if present.

 

As far as I can see the best option is xcopy, with its switches, or is there another option?

 

Err = system ("xcopy /S/Q/Y/R/K \\\\NW_Drive\\Test_Fol\\TestDataSource\\Rel\\TestCode\\*.* C:\\Test_Loc\\test\\SRM\\");

 

If it is to be xcopy can it be done without a command window or at least a small or minimized command window?

 

Thanks for the help

Simon

0 Kudos
Message 1 of 3
(3,738 Views)
Solution
Accepted by topic author Srm27

You may want to explore LaunceExecutableEx possibilities, especially for its ability to hide the launched program window. Keep in mind that this is an asynchronous call, so if you want to survey the process you need to save the handle returned by the command and periodically check its state with ExecutableHasTerminated () function.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,736 Views)

Roberto,

 

Thanks, using LaunchExecutableEx did the job.

 

As the initial folder is small this copy happens quick.

 

For any thing bigger I will keep in mind to monitor with ExecutableHasTerminated.

 

Thanks,

Simon 

0 Kudos
Message 3 of 3
(3,731 Views)