title: How to determine if file path is absolute or relative in ColdFusion
body: <p>I have a function that accepts a file path. Users can pass in either an absolute or relative path to a file. If a relative path is provided, the <code>ExpandPath</code> function can convert it to an absolute path like so:</p>
  
  <pre><code>&lt;cfset filepath = ExpandPath("data/test.txt") &gt;
  </code></pre>
  
  <p>.. and it returns:</p>
  
  <pre><code>C:\www\example\data\test
  </code></pre>
  
  <p>But if user provides an absolute path like:</p>
  
  <pre><code>&lt;cfset filepath = ExpandPath("C:\www\example\data\test") &gt;
  </code></pre>
  
  <p>.. it returns:</p>
  
  <pre><code>C:\www\example\C:\www\example\data\test
  </code></pre>
  
  <p>How may I solve this problem?</p>