[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fopen() of Windows file names containing spaces
From: |
AileenRose |
Subject: |
fopen() of Windows file names containing spaces |
Date: |
9 Dec 2006 08:56:20 -0800 |
User-agent: |
G2/1.0 |
Please help! I have a very frustrating problem which makes me feel dumb
since I am a newbie at this.
The script needs to open a file and remove a line based on a fed value.
Basically it is a web button that calls:
removeline?c:/Program Files/user1/file.txt,line_that_will_be_removed
I take the argument before the comma separator and change the forward
slashes to back slashes.
I have gotten this to work from the command line in cygwin, modified it
to work from the command line in a cmd window. Now, I have to make it
work as the executable that is called from a web page.
I have tried double backslashing, but it cannot open the file.
My file value is something like:
C:\\Program Files\\user1\\file.txt
When I look at my apache logs it shows the error of :
Cannot open file: C:\\Program%20\\user1\\file.txt
Should I be taking care of the '%20' or is this just coming from the
fprintf? How can I "scrub' the filename so that it works from the web?
Thanks!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fopen() of Windows file names containing spaces,
AileenRose <=