|
-
September 29th, 2003, 05:24 AM
#1
How To Find Whether A Folder Exists or Not?
Hello Gurus...
I think this is a silly question for u.. but it is eatingmy brain
How to check whether a folder is exists or not in another folder
If it returns "No" then how toi create it?
I was done this job once using " Scripting.Filesystemobject"
But now i am unable to get it
Please Explain it in " Scripting.Filesystemobject"...or u can take any other
Thanks In Advance
Mind is like Parachute...It functions when it is open
-
September 29th, 2003, 08:48 AM
#2
Include Microsoft Scripting Runtime in Project-->References
In your form:
Dim FsObj As FileSystemObject
Set FsObj = New FileSystemObject
MsgBox FsObj.FolderExists("C:\")
-
September 29th, 2003, 10:06 AM
#3
May i suggest
May be U want to try using VB w/o FSO?
Just Plain DIR() function
U can use any other folder to test this function?
Code:
Dim sDir As String
sDir = "C:\windows\" 'folder must end with a slash
If Dir(sDir) <> "" Then
MsgBox "Folder Exist!"
Else
MsgBox "Folder Does Not Exist!"
End If
I May Have Misinterpret U'r Post
Correct Me If I Am Wrong.........//
Enjoy Coding............................//
zak2zak
-
September 30th, 2003, 08:23 AM
#4
'Microsoft Scripting Runtime
Dim fso As FileSystemObject
Set fso = New FileSystemObject
If Not fso.FolderExists("Path") Then fso.CreateFolder("Path")
-
November 15th, 2003, 04:57 PM
#5
Windows 98 initially does not include the Windows Scripting Host component.
How can I create a folder using VB instrucions rather than the fso?
Since I don't work for Microsoft, I don't want to force the user to install Internet Explorer 6.0 SP8 with MSN Messenger 15.5 nor the latest 800 critical system updates to get a stupid file. Nor copy it manually.
I hate when I start any app in a fresh windows 98 install and NOTHING works. So from now on I avoid the Windows Common Controls, Windows Script host and other new components.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|