That solved it! Thanks so much Nat.
Nat Goodspeed wrote: ________________________________________
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Nathan Pierluissi
Sent: Saturday, February 03, 2007 5:53 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] [Filesystem] Folders with spaces in the name
I am having trouble using the /= operator to open folders with spaces in the name, ex. "My Documents" or "Program Files". Here is an example code:
path full_path("c:\");
string Fname="Program Files";
full_path/=Fname;
It works for any Fname (folder name) that doesn't have a space. Let me know if you need more information. Thanks in advance.
[Nat] You didn't explain the nature of your 'trouble,' but if you're encountering exceptions, it's probably the default boost::filesystem::path syntax checker. Try explicitly disabling that rather than letting operator/= implicitly convert your string to boost::filesystem::path with the default checker, e.g. (neither compiled nor tested):
full_path /= path(Fname, no_check);
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.