Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
sc #1
change into a directory to create other folders/directory
I need to create sub folders in a parent folder..
i have ...
<cfset session.parentdir = "e:\mainstuff\">
<cfdirectory action="create" directory="#session.parentdir##getid.id#\new">
<cfdirectory action="create" directory="#session.parentdir###getid.id#\bad">
creats e:\mainstuff each time..
how do i make this first go into the mainstuff
THEN create getid\new ?
sc Guest
-
Change Directory
Currently Contribute is trying to get the site files out of the wrong folder ... how can I correct this?? I am not the site administrator but I do... -
How would I create a directory in ASP.NET?
I've got a permission issue when I try to create a folder programmatically using C# in an ASP.NET web service. I've set ASP.NET user to have full... -
Active Directory Search fails ("The directory service is unavailab
Hi all, I'm having one of those nerve wrecking errors, when trying to perform a simple search in an Active Directory. The objective of the code... -
Server cannot access application directory ... The directory does not exist or is not accessible because of security settings
If you are using Windows XP in a Workgroup, rather than a Domain, then by default "Simple Filesharing" is turned on, and you won't see a security... -
Server cannot access application directory... The directory does not exist or is not accessible because of security settings.
Hi, I have this issue with the error below. Let me explain my goal and my server environement: Goal: To have 3 separate web servers reading... -
mxstu #2
Re: change into a directory to create otherfolders/directory
creats e:\mainstuff each time..
What do you mean creates it every time?
mxstu Guest
-
Jens Hauser #3
Re: change into a directory to create other folders/directory
You have to check to see if mainstuff folder exists each time and then
create another getit\new folder. This way you can be sure to create new
folder each time.
Jens
"sc" <myis10_nospam_@covad.net> skrev i meddelandet
news:dbdn7t$8q8$1@forums.macromedia.com...>I need to create sub folders in a parent folder..
>
> i have ...
>
> <cfset session.parentdir = "e:\mainstuff\">
>
>
> <cfdirectory action="create"
> directory="#session.parentdir##getid.id#\new">
> <cfdirectory action="create"
> directory="#session.parentdir###getid.id#\bad">
>
> creats e:\mainstuff each time..
>
> how do i make this first go into the mainstuff
>
> THEN create getid\new ?
>
>
>
Jens Hauser Guest
-
mxstu #4
Re: change into a directory to create otherfolders/directory
You have to check to see if mainstuff folder exists each time...
I tested this under MX 6.1, and it was not necessary to check or create the
"mainstuff" directory first. That directory was automatically created when the
first child directory was created.
The attached code produced the following directory structure:
d:\mainstuff\ ---- contents
d:\mainstuff\23
d:\mainstuff\89
d:\mainstuff\92
d:\mainstuff\23\bad
d:\mainstuff\23\new
d:\mainstuff\89\bad
d:\mainstuff\89\new
d:\mainstuff\92\bad
d:\mainstuff\92\new
<!--- create a test query with 3 records --->
<cfset getID = queryNew("ID")>
<cfset QueryAddRow(getID, 3)>
<cfset QuerySetCell(getID, "ID", 23, 1)>
<cfset QuerySetCell(getID, "ID", 89, 2)>
<cfset QuerySetCell(getID, "ID", 92, 3)>
<cfset session.parentdir = "d:\mainstuff\">
<cfoutput query="getID">
<cfif NOT DirectoryExists("#session.parentdir##getid.id#\new ")>
<cfdirectory action="create" directory="#session.parentdir##getid.id#\new">
</cfif>
<cfif NOT DirectoryExists("#session.parentdir##getid.id#\bad ")>
<cfdirectory action="create" directory="#session.parentdir##getid.id#\bad">
</cfif>
</cfoutput>
mxstu Guest



Reply With Quote

