I think you should rewrite your code either as: int processFile(const fs::path& fileName) { fs::path copyFileName(fileName.string() + ".bak"); fs::copy_file(fileName, copyFileName); } or as: int processFile(const fs::path& fileName) { fs::path copyFileName(fileName.native_file_string() + ".bak", fs::native); fs::copy_file(fileName, copyFileName); } In your example you are creating a fs::path from a string in "native" form by using the default constructor, which expects the string to be in "generic" form. Hope this helps. Regards, Michele Galante Zucchetti Centro Sistemi s.p.a. m.galante@centrosistemi.it -----Messaggio originale----- Da: Scott Meyers [mailto:Usenet@aristeia.com] Inviato: giovedì 11 dicembre 2003 7.11 A: boost-users@lists.boost.org Oggetto: [Boost-users] filesystem::copy_file throws -- but why? [...] int processFile(const fs::path& fileName) { fs::path copyFileName(fileName.native_file_string() + ".bak"); fs::copy_file(fileName, copyFileName); } This throws an exception: boost::filesystem::path: invalid name "D:\Temp\CDFix\INDEX.HTM.bak" in path: "D:\Temp\CDFix \INDEX.HTM.bak" [...]