PDA

View Full Version : Using a Variable to create a folder path



Mango
01-27-2007, 09:26 AM
Hi

I am working on a project and am stuck trying to create the following.

I have created a variable called UserName, which gets its information from the registry - this is working OK. However, I wish to use that variable to create a folder:-
Folder.Create("D:\\MyDocs\\UserName\\My Documents") where UserName is replaced by the text within it.
All syntax variations I have tried fail to reproduce correctly. Has anyone any ideas please?

Thanks

jfxwave
01-27-2007, 09:39 AM
Folder.Create("D:\\MyDocs\\"..UserName.."\\My Documents")

Mango
01-27-2007, 11:12 AM
I didn't think of Concatanating it !

Many thanks for a quick reply