Feb 13, 2001 #1 Craftor Programmer Feb 1, 2001 420 NZ I need to find out of a certain file (designated by the user) exists so that if it doesn;t, an error is raised and the program's execution is halted. How do I find if this file exists?
I need to find out of a certain file (designated by the user) exists so that if it doesn;t, an error is raised and the program's execution is halted. How do I find if this file exists?
Feb 13, 2001 #2 Ologhai Programmer Apr 11, 2000 42 CA HI With Dir function you can know if the file exist Dir[(pathname[, attributes])] ___________________________ Hugues Gauthier Programmeur Analyste Progitech --------------------------- hugues_gauthier@hotmail.com Upvote 0 Downvote
HI With Dir function you can know if the file exist Dir[(pathname[, attributes])] ___________________________ Hugues Gauthier Programmeur Analyste Progitech --------------------------- hugues_gauthier@hotmail.com
Feb 13, 2001 #3 pup Programmer Feb 13, 2001 3 US I Give users a Common Dialog to avoid errors. Upvote 0 Downvote
Feb 21, 2001 Thread starter #4 Craftor Programmer Feb 1, 2001 420 NZ Hi all Have found another way to do this, in case anyone is interested: dim FS as Scripting.FileSystemObject Set FS = New Scripting.FileSystemObject if FS.FileExists("C:\MyDir\Myfile.txt" then end if X-) Upvote 0 Downvote
Hi all Have found another way to do this, in case anyone is interested: dim FS as Scripting.FileSystemObject Set FS = New Scripting.FileSystemObject if FS.FileExists("C:\MyDir\Myfile.txt" then end if X-)