Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is wrong with this statement

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
MX
Hi:
What is wrong with this statement
set f2=fso.CreateFolder ("U:\My Documents\CCNum",true)
I need to create a folder called CCNum in this directory.
Does anyone have any good websites on FSO
 
You dont have the second parameter of the CreateFolder, you need to check if exists before you can create. also you have to have a valid Drive leter in order to work.
Try here

and this code
Code:
path="C:\My Documents\CCNum"
set fso=Server.CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(path) then
	set f2=fso.CreateFolder (path)
end if

________
George, M
 
The U drive needs to be mapped on the server for this to work.

BDC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top