I had assumed that if you use the copyFromUSB() to copy a file that already exists that it would leave the file alone on the event of a failure. Instead if the file doesn't exist on the USB key it reports the failure but deletes the local file.
I am sure I can work around this by copying the local file, trying to read form USB and if there is a failure copying the file back but this seems a long-winded way to do it as there doesn't appear to a be a simple way to determine if the file does exist on the USB key rather than getting a list of all files
copyfromusb deletes local file on failure
- andymartyn
- Posts: 25
- Joined: Wed Oct 29, 2014 4:51 am
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: copyfromusb deletes local file on failure
Hello andymartyn,
This is how it works currently. It isn't very friendly. I am going to log this to see if we can find a better way for the copyFromUSB() to work.
As you say, you can use the function to get a list of filenames on the USB before trying to copy as a means to get around the problem.
Thank you for continued support of the PowerVision Configuration Studio!
This is how it works currently. It isn't very friendly. I am going to log this to see if we can find a better way for the copyFromUSB() to work.
As you say, you can use the function to get a list of filenames on the USB before trying to copy as a means to get around the problem.
Thank you for continued support of the PowerVision Configuration Studio!
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- andymartyn
- Posts: 25
- Joined: Wed Oct 29, 2014 4:51 am
Re: copyfromusb deletes local file on failure
Thank you for looking at this. I will see what I can do to work around it