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"
directory="#sourceDirec#"
newDirectory="#destDirec#" />
0 comments:
Post a Comment