Here's the way I ensuring that the export file path exists now:
<CFSCRIPT>
ExportFileParentDirectory = GetDirectoryFromPath(DefaultPayrollExportFile);
MissingDirectoryList = "";
</CFSCRIPT>
<CFLOOP CONDITION="NOT
DirectoryExists(ExportFileParentDirectory)"><CFSCRIPT>
MissingDirectoryList = ListPrepend(MissingDirectoryList,
ExportFileParentDirectory);
ExportFileParentDirectory =
GetDirectoryFromPath(ExportFileParentDirectory);
</CFSCRIPT></CFLOOP>
<CFLOOP INDEX="SubDirectory" LIST="#MissingDirectoryList#"><CFDIRECTORY
ACTION="CREATE"
DIRECTORY="SubDirectory"
></CFLOOP>
-----Original Message-----
From: Dave Babbitt [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 10:33 AM
To: CF-Talk
Subject: Ensure File Path Exists?
Hi Guys!
Is there a UDF or Custom Tag that will create the directories necessary to
save to any filepath? I imagine the best way to do it would be to peal the
subdirectories off the file path onto a stack, then take them off the stack
one by one and create as neccessary, but I can't find a UDF or Custom Tag
that creates a stack either.
Thanx
Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists