title: C# exception, "The given path's format is not supported."
body: <p>I'm using <a href="http://www.csscript.net/" rel="nofollow noreferrer">CS-Script</a> to compile it, and it compiled fine after I fixed all the syntax errors. I compiled it to a console application executable. </p>
  
  <pre><code>Unhandled Exception: System.NotSupportedException: The given path's format is not supported.
     at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
     at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
     at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
     at MainClass.Main(String[] argv)
  </code></pre>
  
  <p>I already searched through a few threads and tried a few things, and it didn't work. </p>
  
  <pre><code>    string ws = @"C:\Users\Computer 1\Desktop\Workspace2";
      string tech = @"C:\Users\Computer 1\Desktop\Tech Photos";
      string des = @"C:\Users\Computer 1\Desktop\Final";
      List&lt;string&gt; branches = new List&lt;string&gt;(Directory.GetDirectories(tech));
      branches = branches.Select(b =&gt; b.Substring(0,3)).ToList();
      string[] dirs = Directory.GetDirectories(ws);
      string[][] imgs = new string[dirs.Length][];
  
      for (int i = 0; i &lt; dirs.Length; i++)
      {
          imgs[i] = Directory.GetFiles(dirs[i]);
          Array.Sort(imgs[i]);
          imgs[i].Reverse();
          string newDir = Path.Combine(des, String.Concat(branches[i], " Tech Pics"));
          Directory.CreateDirectory(newDir);
          foreach (string f in imgs[i])
          {
              List&lt;string&gt; words = new List&lt;string&gt;(f.Split(' ', '_', '-'));
              string s = branches[i] + " - ";
              foreach (string w in words)
              {
                  if(Char.IsUpper(w[0]) &amp;&amp; Char.IsLower(w[w.Length - 1]))
                      s += " " + w;
              }
  
              s += s.Length &gt; 6 ? "" : "(NAMELESS) - " + i.ToString();
              s += Path.GetExtension(f);
              File.Copy(f, Path.Combine(newDir, s));
          }
      }
  </code></pre>
  
  <p>This program is for automatically looking through a bunch of files and renaming them in a more appropriate format. It compiles fine, but I can't get past this exception. </p>