|
-
Feb 20th, 2002, 12:13 AM
#1
Thread Starter
Hyperactive Member
How to get current directory?
I have this code...How to get current directory?
Private Sub Command1_Click()
Dim fso, f, f1, fc, s, folderspec
folderspec = "c:\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 In fc
s = s & " " & f1.Name
s = s & Chr(13) + Chr(10)
Next
Text1.Text = s
End Sub
If thise file was placed in c:\windows\desktop\
how could i get it to show the current directory?
now i have pre coded it to show C:\ but if it aint in c:\ how can i make it find the current directory ???
***************
Please use [highlight=vb] ..your code.. [/highlight] when posting code!
When you have received the working answer to your question,
please mark it as *SOLVED* + Your Questions Title ...using your Thread's Tool menu.
Also try to point out what answer made it work for you, or edit your first post to contain a quote of the correct answer...
Please Answer All Questions With Working Code Examples...
My Unfinished Projects and My working Programs
***************
-
Feb 20th, 2002, 12:14 AM
#2
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 20th, 2002, 01:05 AM
#3
Registered User
wisper, try this too: CurDir()
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
|