PDA

View Full Version : ASP Create Folder and Subfolder Question


theflyingminstr
02-17-2008, 06:40 AM
Hi, I got myself tangled in a web here..

I am trying to create a folder and a sub-folder at the same time using FileSystemObject.

The problem is that I am creating the first folder based on a variable (strUserName).. and I need to create a sub-folder within whatever that variable is..

Am I in big trouble here or is there a solution to this one?

The code below just makes the "sub-folder" outside the folder I need it in..

Thanks!


'Create an instance of the FileSystemObject
'Dim objFSO
'Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

'Create folder
'If Not objFSO.FolderExists("e:\kunden\homepages\21\ d104772\mysite\members\uploads\" & strUserName & "sub-folder") then
'objFSO.CreateFolder("e:\kunden\homepages\21\d104772\mendimusic\members\uploads\" & strUserName & "sub-folder")
'End If

Spudhead
02-18-2008, 06:01 PM
Should there be another backslash between the user name and "sub-folder"?

(ps. Have you left your site name in the second folder path?)