1. ATTENTION: dos 'copy' under XP problem
- Posted by Al Getz <Xaxo at a?l.c?m> Jul 25, 2007
- 497 views
- Last edited Jul 26, 2007
Hello, Recently i ran into an unusual problem using the dos 'copy' command as called from Eu by system("copy "&pathfrom&" "&pathto,0) The copy works many times over and over again, but about once every two months or so, the file copied to 'pathto' is not the file that appears in 'pathfrom', but ends up being some small file. This only happens when 'pathto' is on another drive. When the pathto is changed to the c:\ drive, it works fine again. The problem seems to have come into the system when i switched to a very large hard drive, that uses 48 bit LBA instead of 28 bit. I say 'seems' here because i can not be positive that this is the main difference, but it only appeared after i switched to the larger hard drive, but since it doesnt happen all the time (only about once every two months) i didnt notice it right away, although i use the software where the problem shows up in about once a day or once every two days on average. I tried various solutions like putting sleep(1) before and after the system command, but that didnt work. I also used wait_key() before and after, but no matter now long you wait it still doesnt work. Strange thing is, tomorrow it will probably work again. I tried rebooting and that did not solve it either. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
2. Re: ATTENTION: dos 'copy' under XP problem
- Posted by don cole <doncole at pa?bel?.net> Jul 25, 2007
- 499 views
- Last edited Jul 26, 2007
Al Getz wrote: > > > Hello, > > > Recently i ran into an unusual problem using the dos 'copy' command > as called from Eu by > system("copy "&pathfrom&" "&pathto,0) > > The copy works many times over and over again, but about once > every two months or so, the file copied to 'pathto' is not the > file that appears in 'pathfrom', but ends up being some small > file. > > This only happens when 'pathto' is on another drive. > When the pathto is changed to the c:\ drive, it works fine again. > > The problem seems to have come into the system when i switched to > a very large hard drive, that uses 48 bit LBA instead of 28 bit. > I say 'seems' here because i can not be positive that this is the > main difference, but it only appeared after i switched to the > larger hard drive, but since it doesnt happen all the time > (only about once every two months) i didnt notice it right away, > although i use the software where the problem shows up in about > once a day or once every two days on average. > > I tried various solutions like putting sleep(1) before and after > the system command, but that didnt work. I also used wait_key() > before and after, but no matter now long you wait it still doesnt > work. Strange thing is, tomorrow it will probably work again. > > I tried rebooting and that did not solve it either. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Hello Al, When you used wait_key just before it did you send to screen, "I am about to copy pathfrom and size to pathto"? And after the copy print on screen, "I just copied pathfrom and size to pathto and size"? Does all this jive and it still copies wrong? If so maybe you have to use a diff dos version for that drive. Just guessing. Don Cole
3. Re: ATTENTION: dos 'copy' under XP problem
- Posted by Al Getz <Xaxo at ?ol?com> Jul 27, 2007
- 465 views
don cole wrote: > > Al Getz wrote: > > > > > > Hello, > > > > > > Recently i ran into an unusual problem using the dos 'copy' command > > as called from Eu by > > system("copy "&pathfrom&" "&pathto,0) > > > > The copy works many times over and over again, but about once > > every two months or so, the file copied to 'pathto' is not the > > file that appears in 'pathfrom', but ends up being some small > > file. > > > > This only happens when 'pathto' is on another drive. > > When the pathto is changed to the c:\ drive, it works fine again. > > > > The problem seems to have come into the system when i switched to > > a very large hard drive, that uses 48 bit LBA instead of 28 bit. > > I say 'seems' here because i can not be positive that this is the > > main difference, but it only appeared after i switched to the > > larger hard drive, but since it doesnt happen all the time > > (only about once every two months) i didnt notice it right away, > > although i use the software where the problem shows up in about > > once a day or once every two days on average. > > > > I tried various solutions like putting sleep(1) before and after > > the system command, but that didnt work. I also used wait_key() > > before and after, but no matter now long you wait it still doesnt > > work. Strange thing is, tomorrow it will probably work again. > > > > I tried rebooting and that did not solve it either. > > > > > > Al > > > > E boa sorte com sua programacao Euphoria! > > > > > > My bumper sticker: "I brake for LED's" > > > > Hello Al, > > When you used wait_key just before it did you send to screen, "I am about > to copy pathfrom and size to pathto"? And after the copy print on screen, "I > just copied pathfrom and size to pathto and size"? Does all this jive and it > still copies wrong? If so maybe you have to use a diff dos version for that > drive. Just guessing. > > Don Cole Hi Don, Yes, whenever i have a problem this strange i take my time trying to find out what could be wrong, and do every little thing necessary in order to make sure what i think is happening is actually happening, including, but not limited to, surrounding the statement with test statements that provide absolutely positive feedback that the statement is actually being executed. Also, while i was testing that statement, i kept Windows Explorer open to the 'copy to' directory, waiting to someday (ha ha) see the file get copied there...careful to do a 'refresh' after each try. The file was supposed to be something very big, but it only showed up as 1k each time (rounded by Win Explorer). The work around was to use xcopy instead of copy, and xcopy seems to work all the time, but it keeps prompting to find out if you want the name to be a directory or a file, so it's a pain when used to copy several (more like 50 to 100) files with an Eu program. I have to keep answering "F" (for "file" instead of D for directory) just before each copy or it wont copy at all. The other work around was to simply open the filenames to be copied and use Eu itself to copy each and every byte, one at a time. This works too but takes longer. Next i'll probably just use the C library (i think it's Kernel.dll) and it's file copy c routines. I guess i should be using that anyway being on Windows, but it's strange that 'copy' all of a sudden doesnt work right sometimes. I dont think it's Euphoria doing it, and im not allocating any memory in this program. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."