VB.NET | Get current user profile folder
I have a small question, how can I use 'path' to go to the user current
profile
for example I have this code:
Dim fso, fldr
fso = CreateObject("Scripting.FilesystemObject")
fldr = fso.GetFolder("C:\Documents and Settings\%UserProfile%\Local
Settings\TEST")
'delete subfolders
For Each subf In fldr.SubFolders
subf.Delete(True)
Next
'delete subfiles
For Each fsofile In fldr.Files
fsofile.Delete(True)
Next
Iv tried this way and the path is unknown.. how can I make C:\Documents
and Settings\???\Local Settings\TEST to go to the current user
No comments:
Post a Comment