Elizabeth Dodd wrote: > On Tue, 7 Feb 2006 07:06, Michael Christie wrote: >> Sorry the previous post should read " moves all the text files >> (*.txt) from c:\test1 folder to c:\test2 folder." >> You know what I mean! >> _______________________________________________ >> Gpcg_talk mailing list >> [email protected] >> http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk > > Now, this is rusty indeed > > copy c:\test1\*.txt c:\test2\*.txt > del c:\test1\*.txt
The problem with the above is what happens if the copy fails (due to lack of disc space)? The delete will still proceed. Then you have no files anywhere... Doesn't MS-DOS have a MOVE command which copies first, checks to see whether the copy has succeeded, then deletes the original? Hold on... Google says yes: http://www.easydos.com/move.html - the /Y swith may be useful as well. Note that I am presuming that MS-DOS checks for a successful copy before deleting when MOVE is used. However, since MS-DOS is a Microsoft sub-system, who knows, and all bets are off with respect to intrinsically safe operation.. Tim C _______________________________________________ Gpcg_talk mailing list [email protected] http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk
