|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Creating Folders Using FileSystemObject.
Hi All,
I want to create folders in a heirarchy. When i use the following code path = "c:\folder1\folder2\folder3" fso.createFolder path It creates a new folder named "folder3" if folder1 and folder2 already exists. But if folder1 and folder2 does not exist then it gives error that "path not found". I want if folder1 and folder2 not exists then first create them and then create folder3 automatically. Is there any solution for my prob. or i will have to Programmatically create folders one by one which i think is not a good way. Please reply soon. Imran Ghani. |
|
#2
|
||||
|
||||
|
you HAVE to create each folder. no shortcut.
![]() |
|
#3
|
|||
|
|||
|
i disagree, i think programming it to make folders one by one is good practice
now, go get started on those sweet sweet if folder does not exist nexted ifs |
|
#4
|
|||
|
|||
|
That's why, if you've read the documentation, you'd notice that there is a FolderExists method.
On specifying a folder, the methods returns a Boolean true if the folder is found, and false otherwise. If you mistakenly pass a file name as the parameter, then it will return false as well. [bExist =] objFSO.FolderExists(folder) Hope this helps! Sincerely Vlince |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Creating Folders Using FileSystemObject. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|