House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

Array a directory name

Author:
Christopher Watson
04/27/2012 02:28 PM

If your example represents the exact scenario in all cases, I'd probably just use GetFileFromPath() and GetDirectoryFromPath(), in conjunction with ListLast(): <!--- Where OldDir = Internet/Manuals/tests/doc.html ---> <cfset NewDir = "#ListLast(GetDirectoryFromPath(OldDir),'/')#/#GetFileFromPath(OldDir)#"> -Christopher >How do you split a directory name into an array or remove a section from the name? > >Example > >dir = Internet/Manuals/tests/doc.html > >into > >newdir = tests/doc.html > >Thank you >Keith


Search cf-talk

May 18, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference