473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

brakets aloud in a file name or path?

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
6 1350

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
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
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

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
<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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up...
15
by: Jon Skeet | last post by:
I've been briefly musing on what is probably a pretty silly idea, but one which would no doubt benefit from being discussed and thoroughly shot down in flames rather than being allowed to fester in...
5
by: Grant Merwitz | last post by:
I've seen many ads in these newgroups like the one posted about 4 below (Read Asp.NET in www.ebook5.com) Is this allowed? I find it highly annoying because people come here either to help, ...
5
by: EP | last post by:
This inquiry may either turn out to be about the suitability of the SHA-1 (160 bit digest) for file identification, the sha function in Python ... or about some error in my script. Any insight...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
by: wuzertheloser | last post by:
The correct program should look like this: Total number of voting cards: 55 Votes for candidate 1: 1 Votes for candidate 2: 10 Votes for candidate 3: 8 Votes for candidate 4: 13 Votes...
4
by: Jamey Shuemaker | last post by:
A2k2 with user-level security and all preventive measures, vis a vis, Security FAQ enabled or enacted. I've got three DBs, which due to size constraints can't, or rather, probably shouldn't be...
4
by: tasahmed | last post by:
Hello Friends, I wrote a function which scans the current working directory and lists out details such as directory/file owner, permission etc. The output of this script can be viewing in the...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.