Click to See Complete Forum and Search --> : Check for the exisitence of a folder


shanuragu
10-08-2003, 08:03 AM
Hi

I want to upload pictures for a perticular folder.
How can i create a folder from asp page & also I want to check for the existence of the folder before creating it. ie, if the folder is not present in the given path create the folder & then upload files else upload files directly.

shara

lcscne
10-08-2003, 11:10 AM
Check this:

http://www.aspsmart.com/aspSmartUpload/

rdoekes
10-08-2003, 10:43 PM
Or use the build in FileSystemObject methods for this particular check

Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExists("c:\somefolder") Then _
oFSO.CreateFolder("c:\somefolder")

shanuragu
10-09-2003, 05:35 AM
Thanks rdoekes :D

Any function to delete a particular folder in a given path??

shara

rdoekes
10-09-2003, 05:39 AM
change CreateFolder to DeleteFolder in code from my previous post.
Here a quick reference guide to the entire FileSystemObject
http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html

shanuragu
10-09-2003, 05:47 AM
Thank rdoekes for ur help :p