Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

Question on %Username% location [SOLVED]

$
0
0
I am trying to delete a file located in ("C:\Users\Josh\Desktop\text.txt")
I use My.Computer.FileSystem.DeleteFile("C:\Users\Josh\Desktop\text.txt") and that worked.

But if i were to use the application in another computer, the location would not be on "Josh".
What do i put instead of Josh so it will access the user's desktop?

I tried ("C:\Users\%Username%\Desktop\text.txt") but it didn't work

Thanks.

Viewing all articles
Browse latest Browse all 27355

Trending Articles