From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-19-2012 04:36 PM
I'm using System Exec.vi to call xcopy in dos command. I've tried to leave "Wait Until Completion?" input as True and that didn't work -- nothing was copied. So I changed it to False and it worked: the directories, folders and files were copied successfully. Now my question is: how will my labview program know when the xcopy finishes? Is there any way to read it's exit code? How?
Thanks very much!
Solved! Go to Solution.
03-19-2012 11:37 PM
Hi,
Random doubt. Why do you want to run xcopy in system exe when you already have a COPY function in the File I/O palette? Check the attached example.
Regards,
Nitz
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved;))
03-20-2012 03:02 AM
xcopy has many more options but the lv copy does almost the same job without the options,
03-20-2012 08:56 AM
Thanks Nitz and Akiel for looking at my issues! I'd love to give you guys Kudos if my problem was resolved!
The reason I'm using xcopy is that the copy.vi in Labview didn't work with our NFS from a unix box. I posted some questions about this issues with NFS and didn't get good answers. Then I tried copy and xcopy in dos command, they worked. For copy, I left Wait until completion? to True and it worked fine. For xcopy, I had to change Wait Until Completion? to False to get it working. I don't know why. Maybe it has something to do with large amount of data transfer. (for copy, the file sizes are very small). Therefore I'm trying to find out how to detect when the xcopy finishes.
I apologize if I made a mistake by openning this new thread here so you guys didn't get the whole picture of my issues.
I hope you guys or someone else can help me out!
Many thanks!
03-20-2012 09:01 AM
perhaps monitor the dos windows (its an ouput from system exec) for a return to the prompt or similar. this works even if you have chosen not to actually display the command prompt
no problem, btw kudos is for good answers or answers that point you towards a solution, mark as solution is self eplainitory
03-20-2012 09:08 AM
03-20-2012 11:39 AM
Perhaps the reason xcopy fails when you wait for completion is that the output size > 4096.
Try wiring a bigger number to that input.
03-20-2012 03:40 PM
Hi Andrey,
I downloaded windows resource kits and tried robocopy. It did work with System Exec while the Wait Until Completion set to default (True)! So this way, my labview program will know when the copy tasks finishes. Thank you so much for the great idea!
Regards.
03-20-2012 03:42 PM
Hi pcardinale,
I've tried to increase that number to 99999999 and it didn't help.
Thank you for your effort trying to help!
03-20-2012 03:44 PM
Hi Akiel,
I've tried to monitor that output and for some reason, I was never able to see anything from it.
I appreciate your time and effort very much!
Regards.