Re: CFDirectory Help

2007-05-24 Thread Teddy R Payne
Joel,
I usually create a variable to hold the value of the directory that I want 
to exist.

ei. "c:\pathtofile\directoryIwanttocreate"

After I create the string, I have a common method in a a file CFC like this:

 
  

  
   
  

 

- Original Message -
From: "Joel Watson" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Thursday, May 24, 2007 8:41 AM
Subject: Re: CFDirectory Help

> Thanks for the tip--this UDF is pretty cool.
>
> Unfortunately, it doesn't solve my problem, for even if it returns false, 
> the cfdirectory tag continues to be run, throwing an error when the 
> directory exists.
>
> For whatever reason, I am having difficulty getting it to bypass this 
> cfdirectory tag if the directory-existence check returns true.
>
> Any ideas?
>
> Thanks
>
> Joel
>
>>You can use a nifty UDF for this on CFLIB.  Search for MakeDirectory or
>>Directory. It is a nifty addition.
>>
>>
>>"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
>>Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
>>Registered in England, Number 678540.  It contains information which is
>>confidential and may also be privileged.  It is for the exclusive use of 
>>the
>>intended recipient(s).  If you are not the intended recipient(s) please 
>>note
>>that any form of distribution, copying or use of this communication or the
>>information in it is strictly prohibited and may be unlawful.  If you have
>>received this communication in error please return it to the sender or 
>>call
>>our switchboard on +44 (0) 20 89107910.  The opinions expressed within 
>>this
>>communication are not necessarily those expressed by Reed Exhibitions."
>>Visit our website at http://www.reedexpo.com
>>
>>-Original Message-
>>From: Scott Stroz
>>To: CF-Talk
>>Sent: Wed May 23 22:45:46 2007
>>Subject: Re: CFDirectory Help
>>
>>Shot in the dark:
>>
>>
>>
>>On 5/23/07, Joel Watson <[EMAIL PROTECTED]> wrote:
>
> 

~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279059
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFDirectory Help

2007-05-24 Thread Joel Watson
Thanks for the tip--this UDF is pretty cool.

Unfortunately, it doesn't solve my problem, for even if it returns false, the 
cfdirectory tag continues to be run, throwing an error when the directory 
exists.  

For whatever reason, I am having difficulty getting it to bypass this 
cfdirectory tag if the directory-existence check returns true.

Any ideas?

Thanks

Joel

>You can use a nifty UDF for this on CFLIB.  Search for MakeDirectory or
>Directory. It is a nifty addition.
>
>
>"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
>Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
>Registered in England, Number 678540.  It contains information which is
>confidential and may also be privileged.  It is for the exclusive use of the
>intended recipient(s).  If you are not the intended recipient(s) please note
>that any form of distribution, copying or use of this communication or the
>information in it is strictly prohibited and may be unlawful.  If you have
>received this communication in error please return it to the sender or call
>our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
>communication are not necessarily those expressed by Reed Exhibitions." 
>Visit our website at http://www.reedexpo.com
>
>-Original Message-
>From: Scott Stroz
>To: CF-Talk
>Sent: Wed May 23 22:45:46 2007
>Subject: Re: CFDirectory Help
>
>Shot in the dark:
>
>
>
>On 5/23/07, Joel Watson <[EMAIL PROTECTED]> wrote:

~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279058
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFDirectory Help

2007-05-23 Thread Robertson-Ravo, Neil (RX)
You can use a nifty UDF for this on CFLIB.  Search for MakeDirectory or
Directory. It is a nifty addition.


"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Scott Stroz
To: CF-Talk
Sent: Wed May 23 22:45:46 2007
Subject: Re: CFDirectory Help

Shot in the dark:



On 5/23/07, Joel Watson <[EMAIL PROTECTED]> wrote:
>
> I have an upload form that writes files to directories which have the same
> name as the users uploading the files.
>
> I want to be able to check and see if the directory exists after the
> upload form is submitted, and if it does not exist, create it and then
> upload the file to it.
>
> Right now, I have this bit of code:
>
> 
>  directory="#ExpandPath("./#FORM.username#")#">
> 
>
> It works like a charm if the directory does not exist.  However, on
> subsequent upload attempts (after directory is created), I receive this
> error:
>
> The specified Directory attribute value
> C:\CFusionMX7\wwwroot\rootdir\usernamedir could not be created.
> The most likely cause of this error is that
> 'C:\CFusionMX7\wwwroot\rootdir\usernamedir' already exists on your file
> system. The exception occurred during a cfdirectory action="create".
>
> Obviously, I realize that the directory exists.  How should I write my
> cfif statement so that it will bypass the "create" functionality of the
> directory does exist?
>
> Thanks
>
> 



~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279025
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFDirectory Help

2007-05-23 Thread Scott Stroz
Shot in the dark:



On 5/23/07, Joel Watson <[EMAIL PROTECTED]> wrote:
>
> I have an upload form that writes files to directories which have the same
> name as the users uploading the files.
>
> I want to be able to check and see if the directory exists after the
> upload form is submitted, and if it does not exist, create it and then
> upload the file to it.
>
> Right now, I have this bit of code:
>
> 
>  directory="#ExpandPath("./#FORM.username#")#">
> 
>
> It works like a charm if the directory does not exist.  However, on
> subsequent upload attempts (after directory is created), I receive this
> error:
>
> The specified Directory attribute value
> C:\CFusionMX7\wwwroot\rootdir\usernamedir could not be created.
> The most likely cause of this error is that
> 'C:\CFusionMX7\wwwroot\rootdir\usernamedir' already exists on your file
> system. The exception occurred during a cfdirectory action="create".
>
> Obviously, I realize that the directory exists.  How should I write my
> cfif statement so that it will bypass the "create" functionality of the
> directory does exist?
>
> Thanks
>
> 

~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279024
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFDirectory Help

2007-05-23 Thread Joel Watson
I have an upload form that writes files to directories which have the same name 
as the users uploading the files.

I want to be able to check and see if the directory exists after the upload 
form is submitted, and if it does not exist, create it and then upload the file 
to it.

Right now, I have this bit of code:



 

It works like a charm if the directory does not exist.  However, on subsequent 
upload attempts (after directory is created), I receive this error:

The specified Directory attribute value 
C:\CFusionMX7\wwwroot\rootdir\usernamedir could not be created.
The most likely cause of this error is that 
'C:\CFusionMX7\wwwroot\rootdir\usernamedir' already exists on your file system. 
The exception occurred during a cfdirectory action="create". 

Obviously, I realize that the directory exists.  How should I write my cfif 
statement so that it will bypass the "create" functionality of the directory 
does exist?

Thanks

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279022
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: cfdirectory help - photo album

2003-08-26 Thread Michael Wolfe
> If you pass to the display page the forward and back values, 
> and then click forward or back, how are you going to know 
> what the next next or previous previous values are.
> 
> I would instead suggest that on the display page you again do 
> a cfdirectory, and then grab the previous and next files from 
> the list on each display of the page.

Performance tip:

If you have a lot of users hitting the gallery pages, your hard drives will
take quite a beating from all of the CFDIRECTORY accesses. Unless your
gallery is constantly being updated, store the CFDIRECTORY result in an
application variable.  Then, all you have to do is check for existence of
the application variable each time the page loads.  If you are using CFMX,
you can make this even easier by putting the code into a CFC.


Mike Wolfe
[EMAIL PROTECTED]


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


Re: cfdirectory help - photo album

2003-08-20 Thread Jerry Johnson
Yes. Don't do this.

=)

If you pass to the display page the forward and back values, and then click forward or 
back, how are you going to know what the next next or previous previous values are.

I would instead suggest that on the display page you again do a cfdirectory, and then 
grab the previous and next files from the list on each display of the page.

Just my 2 cents (having recently struggled through this very thing)

Jerry Johnson

>>> [EMAIL PROTECTED] 08/20/03 03:06PM >>>
i am using cfdirectory to display some thumbnails. when a thumbnail is
clicked - it then displays the larger version of the image. what i would
like to do is pass a few variables in the link that will allow 2 more links
to appear on the 'larger version' image page. those 2 links would be 'file
before' and 'file after'. so, if you were to click the 'file before' link -
you would see the image that sits in the same dir before the one you are
looking at. if you were to click 'file after' you would see the image that
appears right after the one you are looking at. pretty much your standard
photo-album app but creating everything dynamically using cfdirectory. any
suggestions? thanks. 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


Re: cfdirectory help - photo album

2003-08-20 Thread Charlie Griefer
if i'm not mistaken, cfdirectory returns a query object.

that being the case, you can manipulate the currentRow variable (+/- 1) to
get the previous and next filenames.

- Original Message - 
From: "Wurst, Keith D." <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 12:06 PM
Subject: cfdirectory help - photo album


> i am using cfdirectory to display some thumbnails. when a thumbnail is
> clicked - it then displays the larger version of the image. what i would
> like to do is pass a few variables in the link that will allow 2 more
links
> to appear on the 'larger version' image page. those 2 links would be 'file
> before' and 'file after'. so, if you were to click the 'file before'
link -
> you would see the image that sits in the same dir before the one you are
> looking at. if you were to click 'file after' you would see the image that
> appears right after the one you are looking at. pretty much your standard
> photo-album app but creating everything dynamically using cfdirectory. any
> suggestions? thanks.
> 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


cfdirectory help - photo album

2003-08-20 Thread Wurst, Keith D.
i am using cfdirectory to display some thumbnails. when a thumbnail is
clicked - it then displays the larger version of the image. what i would
like to do is pass a few variables in the link that will allow 2 more links
to appear on the 'larger version' image page. those 2 links would be 'file
before' and 'file after'. so, if you were to click the 'file before' link -
you would see the image that sits in the same dir before the one you are
looking at. if you were to click 'file after' you would see the image that
appears right after the one you are looking at. pretty much your standard
photo-album app but creating everything dynamically using cfdirectory. any
suggestions? thanks. 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm