By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

brakets aloud in a file name or path?

P: n/a
Hello,

Are brakets () allowed in a file path?

eg.

Passing:

Y:\trak\pdf\98-00_2_123\tst.ps works but

Y:\trak\pdf\98-00_(2)_123\tst.ps does not.

Is there any reason why it wouldn't?
Thanks,
F

Oct 25 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

fatima.iss...@gmail.com wrote:
Hello,

Are brakets () allowed in a file path?

eg.

Passing:

Y:\trak\pdf\98-00_2_123\tst.ps works but

Y:\trak\pdf\98-00_(2)_123\tst.ps does not.

Is there any reason why it wouldn't?
Thanks,
F
surprised the first one works. It's not the brackets I see as the
problem but that \t sequence which is interpreted by C++ as a tab
character.

Use / instead of \. You can use \\ but / is recommended.

Oct 25 '06 #2

P: n/a
Hi Earl,

Tried to change it. The slashes are not the problem. Any other ideas?

Thanks for the quick reply.

Earl Purple wrote:
fatima.iss...@gmail.com wrote:
Hello,

Are brakets () allowed in a file path?

eg.

Passing:

Y:\trak\pdf\98-00_2_123\tst.ps works but

Y:\trak\pdf\98-00_(2)_123\tst.ps does not.

Is there any reason why it wouldn't?
Thanks,
F

surprised the first one works. It's not the brackets I see as the
problem but that \t sequence which is interpreted by C++ as a tab
character.

Use / instead of \. You can use \\ but / is recommended.
Oct 25 '06 #3

P: n/a
fa***********@gmail.com wrote:
Hello,

Are brakets () allowed in a file path?
On Windows it would appear so.
>
eg.

Passing:

Y:\trak\pdf\98-00_2_123\tst.ps works but

Y:\trak\pdf\98-00_(2)_123\tst.ps does not.

Is there any reason why it wouldn't?
Thanks,
F
Because the first exists and the second doesn't? They are two different
file names.

--
Bill Medland
Oct 25 '06 #4

P: n/a

fa***********@gmail.com wrote:
Hi Earl,

Tried to change it. The slashes are not the problem. Any other ideas?
In what are you storing the filename?
what are you doing with the filename?
what do you mean by "it doesn't work"?
>
Thanks for the quick reply.

Earl Purple wrote:
fatima.iss...@gmail.com wrote:
Hello,
>
Are brakets () allowed in a file path?
>
eg.
>
Passing:
>
Y:\trak\pdf\98-00_2_123\tst.ps works but
>
Y:\trak\pdf\98-00_(2)_123\tst.ps does not.
>
Is there any reason why it wouldn't?
Thanks,
F
surprised the first one works. It's not the brackets I see as the
problem but that \t sequence which is interpreted by C++ as a tab
character.

Use / instead of \. You can use \\ but / is recommended.
Oct 25 '06 #5

P: n/a
<fa***********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hello,

Are brakets () allowed in a file path?

eg.

Passing:

Y:\trak\pdf\98-00_2_123\tst.ps works but

Y:\trak\pdf\98-00_(2)_123\tst.ps does not.

Is there any reason why it wouldn't?
Thanks,
F
It shoudl work. std::cout << whatever you have
"Y:\trak\pdf\98-00_(2)_123\tst.ps" stored in and make sure that's what it
actually is.
Oct 25 '06 #6

P: n/a
I found the problem: One of the programs I use called a vb shell. The
brakets were causing the problem there.

Thanks for all your help.

Oct 25 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.