community.borland.com

Article #15822: MOVING FILES ACROSS DIRECTORIES

 Technical Notes Database

TN822D.txt   MOVING FILES ACROSS DIRECTORIES
Category   :Pascal
Platform    :All
Product    :Turbo Pascal  4.0+

Description:
Q. How can I move a file from one directory to another from a Turbo Pascal
  program?
A. If you are on a system equipped with a hard drive, you can simply use the
  RENAME procedure. Assign a file variable to the file name as it currently
  appears in the directory. Use the same file name when RENAME is called but
  replace the directory path specified with that of directory where the file
  is to be placed.

  This method will not work across drives. See the Copyfile example from the
  description of BLOCKREAD in the Turbo Pascal Reference Lookup Chapter in the
  Reference Manual.


Reference:


7/16/98 4:35:36 PM
 

Last Modified: 01-SEP-99