03-03-2011 03:15 AM
Hi All
I am currently using XXCOPY to copy things from one file to another using commandline.
The problem is that it is illegal for me to use the Freeware Package for the my company.
The licensing is too expensive for XXCOPY and they force a person to be two.
Is a there another copier that is as fexiable as XXCOPY?
And that can do what i have done below ?
The following is what im currently using:
XXCOPY "M:\APPS\R&D\SOFTWARE New Structure" "M:\APPS\R&D\SOFTWARE Slave\" /EXCLUDE:"M:\APPS\R&D\SOFTWARE New Structure\exclude1.txt" /Y /oB2/oA"M:\APPS\R&D\SOFTWARE New Structure\Error Logs\Errors.log" /R/KD/E/Y/ZY/ED0/PB
XXCOPY
"M:\APPS\R&D\SOFTWARE New Structure" "M:\APPS\R&D\SOFTWARE
Slave\" /EXCLUDE:"M:\APPS\R&D\SOFTWARE New Structure\exclude2.txt"
/IN:*.pdf /Y /oB2/oA"M:\APPS\R&D\SOFTWARE New Structure\Error
Logs\Errors.log" /R/KD/E/Y/ZY/ED0/PB
I need to get this going as soon as possible.
Thanks
03-04-2011 11:11 AM
Hi Shako,
Unfortunately LabWondows/CVI has no built in feature that allows you to copy things from one file to another using commandline. Perhaps someone else on the forum will know of some 3rd party freeware. However, if you would like to see this feature be implemented in future releases of CVI, feel free to create a suggestion on the NI Idea Exchange.
03-04-2011 11:37 AM - edited 03-04-2011 11:39 AM
I'm not sure what exactly you're trying to accomplish as I'm not familiar with XXCOPY, but it seems you might be able to write your own function in CVI using GetFirstFile() and GetNextFile() to loop through the files in the directories, and then conditionally move the files using CopyFile() followed by DeleteFile() (CVI does not include a move file function?) based upon your requirements.
Edit: You can apparently move files in one step using RenameFile().
03-07-2011 12:53 AM
I was thinking of using those functions.
But was not sure how to search in all folders and subfolders.
Could you please help me with this?
03-07-2011 08:09 AM
I haven't done it, but it seems like it could work. GetFirstFile() and GetNextFile() can find directories. In order to know it's a directory, you can call GetFileAttrs(), as the return value specifies if the filepath is a file or directory. Basically, the way I would do it is to create a function to copy the everything in a directory, where it would check each item as to if it is a file or a directory, and if it is a directory it would call itself recursively until it's finished.