Article View: alt.msdos.programmer
Article #655Re: mv.exe
From: Jerzy Tarasiuk
Date: Tue, 29 Sep 1992 12:58
Date: Tue, 29 Sep 1992 12:58
15 lines
1510 bytes
1510 bytes
Sorry, there are few bugs in my MV.PAS: when copying file, need Reset(fi,1); and Rewrite(fo,1); - otherwise Turbo Pascal uses default record size 128; need check IoResult after almost every operation (at least after the Reset(fi,1); because it is not true what Borland's manual states as explanation what causes $I- compiler option: "An I/O error thus does not cause the program to stop, but suspends any further I/O until the standard function IOresult is called." - in fact further I/O is not suspended and Rewrite creates output file after Reset which failed because file was not present; additionally Rename to different device causes error 'Not same device' even if renamed file don't exist - final result is empty file created on target device if source don't exist...). Additionally, it is valuable to use GetFTime/SetFTime to set target file date/time to be same as source... All these problems if trying COPY using the MV.PAS, disable possibility to copy (don't $Define COPY) and can use the program without any problem.
Technical Details
Message-ID:
<JT.92Sep29135859@fizyk1.fuw.edu.pl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jtReferences:
<JT.92Sep24164719@fizyk1.fuw.edu.pl>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt From: jt@fuw.edu.pl (Jerzy Tarasiuk) Subject: Re: mv.exe In-Reply-To: jt@fuw.edu.pl's message of Thu, 24 Sep 1992 15:47:19 GMT Message-ID: <JT.92Sep29135859@fizyk1.fuw.edu.pl> Sender: news@fuw.edu.pl Nntp-Posting-Host: fizyk1 Organization: Warsaw University Physics Dept. References: <JT.92Sep24164719@fizyk1.fuw.edu.pl> Date: Tue, 29 Sep 1992 12:58:59 GMT Lines: 15