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.
09-09-2010 06:37 PM
I'm looking for ideas on how to copy a folder and all its subfolders.
My program creates test data organized using folders and subfolders.
At the end of the test I'd like to copy them to a backup drive.
How can I accomplish this?
Thanks,
Kirk
09-09-2010 10:31 PM
Look at the multiple suggestions offered here in this recent post:
http://forums.ni.com/t5/LabWindows-CVI/copyfolder/td-p/1223586
09-10-2010 10:29 AM
Thanks for the useful thread.
This sounds like a function to add to the Labwindows-CVI update "wish-list".
Kirk
04-02-2019 10:17 AM
Hello,
I am sorry but the function CopyFile(,) seems not to work for me to copy folder containing subfolders and files.
CopyFile ("c:\\SourceDirName1\\*.*", "c:\\SourceDirName2");
The command copies however all files immediatly under SourceDirName1.
Has anyone ever experienced that stuff ?
Other suggestions for copying directories is welcomed.
I thried system(" XCOPY c:\\SourceDirName1 c:\\SourceDirName2 /e/y") it works well but display "the Dos console"
Thank you by advance.
04-03-2019 12:54 PM
Have you looked at the following forum post?
https://forums.ni.com/t5/LabWindows-CVI/copyfolder/td-p/1223586
It may also help to create a new thread for your question as this thread is more than 8 years old. Making a new post will give it more visibility.
04-05-2019 09:36 AM
Hello,
As you said, you can use the CMD xcopy with LaunchExecutableEx.
For example : LaunchExecutableEx("xcopy c:\\Source\\ c:\\Dest\\ /m /i /d:04-05-2019 /s /v /r /c /y",LE_HIDE, NULL);
will copy the files and subfolders of the day and will not open a Dos console with the option LE_HIDE.
Alain