Click to See Complete Forum and Search --> : File Directory


May 26th, 1999, 05:16 AM
How do I get the directory of a file that is not in the current directory?

Jason Teagle
May 26th, 1999, 09:17 AM
Where are you getting the filename from (what function)? This will help us decide how to get the full path.

June 1st, 1999, 08:55 AM
if you don't know where the file is you will have a problem since a file name on it self isn't unique, only the full path of the file is unique.
if you know where te file stands you can do the following
getcurrentdirectory, to save the current path
setcurrentdirectory to switch to the directory where the file is
add the currentdirectory and the filename together to make the full path
setcurrent directory to the directory you saved