I love your program so far but I had some problems.
- I tried copying a single subdirectory, e.g. D2:ACTION:*.* to D6:.
Result: No activity.
- tried to copy one folder to another folder, e.g. D2:ACTION:*.* TO D6:ACTION:*.*
Results: No activity (whether or not the target folder already exists). No error message. Process completes.
- tried copying all files and folders to a disk which already has some folders with the same name as the source folders
Result: Copy proceeds until the first destination folder matching one from the source is encountered. Copy aborts and
control returns to MyDOS menu. If there was an error message I didn't get to see it. <--- Edit: two lines added
- same as above but this time an existing file on the destination matches one from the source
Result: files are copied until it is time to overwrite the existing file. I then see 2-3 lines of garbled data and then the
words "exists: overwrite". 800XL crashes.
I used my 800XL (w/ Wiztronics 256K), SIO2PC, with AtariSIO/Atariserver serving the files. I tried with 3 different OSes.
I also duplicated the same test with Atari800 emulator (SDL build). Same or similar results.
- Steve Sheppard
Glad to see some testing and feedback on this. As I said, it wasn't well tested. If people actually want to use it, I'll try and finish it over the weekend.
The failure to copy a directory on its own probably means the logic of the program relies (incorrectly) on the presence of a single file in the source directory. Easily fixed.
The failure when copying to a disk containing folders of the same name as on the source disk is simple to diagnose: the program doesn't check for this condition yet. When it does, it will offer the option to merge source files into the exisiting directory, or skip the directory altogether (and to automatically perform the same action thereafter if desired).
Same as above: there's code in there to check for existing files on the dest drive but it doesn't act on the information yet. Easily fixed.
Error reporting code needs major tidying up.
Like I say, if there's a demand to have this finished, I'll be glad to do it. I would still like some algorithmic ideas on how to avoid copying the destination directory into itself when source and destination drives are the same. For example:
Eventually the program will try to copy the contents of "BACKUP" into itself. Clearly it should avoid this folder. This is easy to program around in the example, but what if the source is "D1:<*.*", etc? Answering my own question here, I think both source and destination paths need to be explicit from the root directory. This will involve picking up the working directory, which I can do.
As for the H: device, the program should be OK with it. The splitpath routine doesn't really care what comes before the colon in the pathname. I'll have a go with it myself over the weekend.Have just realized something here...
Does MyDOS allow colons as path separators (i.e. instead of ">")??? I assume from the above examples that it does.
If so, it would explain quite few problems. The program only checks for right wedges as path separators...
Edited by flashjazzcat, Sat Feb 21, 2009 3:44 AM.