Hello! I was wondering if someone could please offer some advice on how I could do this, as I am completely stuck.
I have the following code to create a new folder in a user's account. What I am trying to do is make the word "USER" be whatever the current user's account name is. I know that I can get the current username using -
But I can't figure out how to make this work with the above code. I tried doing this -
But it says - "Too many arguments to 'Public Sub CreateDirectory(directory As String)"
If anyone could help me, I would really appreciate it! Thanks!
Code:
Sub Main()
My.Computer.FileSystem.CreateDirectory("C:\Users\USER\AppData\Roaming")
End SubCode:
Environment.UserNameCode:
My.Computer.FileSystem.CreateDirectory("C:\Users\" & Environment.UserName, "\AppData\Roaming")If anyone could help me, I would really appreciate it! Thanks!