DIRECTORIES & FILES
Updated: Nov 14, 2005

Directories and Files
~~~~~~~~~~~~~~~~~~~~~
CHDIR string; string = new working directory path.

COPY string1, string2; copies file string1 to file string2

  COPY "c:\hot\hb.bat" "e:\myprog\hb.bat"

  Note above that the file name hb.bat is used twice.  This ensures that some
  Windows versions will not move the file instead of copy it.

EXTRACTRESOURCE RESOURCE(n) | descriptor, string; string = filename. 

  EXTRACTRESOURCE "my_bmp","myfile.bmp"

DELETE string; same as KILL string.

KILL string; string = pathname | file name in current directory.

  KILL does not enter the deleted file into the Recycle Bin.

LIBRARYINST string; installs library string (not needed at present).

MKDIR string; string = name of new directory to create.

MOVE string1, string2; moves file string1 to file string2
  if a file with name string2 does not already exist.  See RENAME.

RENAME string1, string2; renames file string1 to file string2
  if a file with name string2 does not already exist.

  Hint: If file string2 exists, file string1 will not be renamed.  Therefore,
  KILL string2 may be used first to ensure that file string1 is actually
  renamed from string1 to string2.

RMDIR string; string = directory to delete.

UNLOADLIBRARY string; string = library to unload.

Please see String Functions CURDIR$, DIR$ and WINDIR$ and Numeric Functions
DIREXISTS and FILEEXISTS.  The FILE object provides detailed file and IO port
methods to read and write data.  The .LoadFromFile and .SaveToFile methods in
STRING, MEMORY, LIST and certain FORM objects provide "one-stop" file access.


+ Penthouse (registered) version

Copyright 2003-2005 James J Keene PhD
Original Publication: Oct 8, 2003
