Wednesday, December 2, 2009

How to Move A Directory

The round-a-bout way to move a directory always slips through my brain like it is a sieve. So this one is a reminder to myself. Use <cfdirectory action="rename"..>, or in ColdFusion 9 use the sleeker DirectoryRename() function. Note, an error will occur if the destination directory already exists.

<cfset sourceDirec ="C:\docs\images\20091202">
<cfset destDirec ="C:\20091202">

<cfdirectory action="rename"
newDirectory="#destDirec#" />


  © Blogger templates The Professional Template by 2008

Header image adapted from atomicjeep