Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Verifying folder exists (local and network) 1

Status
Not open for further replies.

beedubau

Programmer
Jan 7, 2003
97
AU
I am using a routine

setfileattrib
* Author: William GC Steinford 2003
* Takes a file and a list of attributes to change on the file, and does the change

to confirm that a folder exists as a list of paths has been saved containing a 'project' - some of which might no longer exist.

This involves writing to a file in the folder.

Is there another way of testing for existence of a folder? Under Vista I may not be able to write to that folder.

Regards
Bryan
 
you could use windows scripting host WSH

fso = CreateObject("Scripting.FileSystemObject")
? fso.FolderExists("c:\windows")
? fso.FolderExists("c:\windows2")
first one returns .t.
second one returns .f.


Steve Bowman
Independent Technology, Inc.
CA, USA
 
or
? DIRECTORY("C:\windows")
? DIRECTORY("C:\windows2")

I do not know what version of fox this function first appered

Steve Bowman
Independent Technology, Inc.
CA, USA
 
Steve,

Many thanks..

Directory() works fine on Vista.


Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top