Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: file directory problem in curl command
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Jeremy Nicoll via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 23 Aug 2021 22:04:29 +0100
On Mon, 23 Aug 2021, at 20:45, Bill Mercer via curl-users wrote:
> I was referring to this...
> "E:/NC Voter Files/address/NCaddresses1.csv"
>
> The error message references an invalid path, and that's an invalid path.
Why do you say that? Why then does this command work (in a cmd terminal
window under Win 8.1):
C:\>dir "c:/windows/system32/"
(Here that lists 3399 files.)
Googling suggests that large parts of Windows have, for ages, worked
with forward slashes as well as backslashes.
GUI tools might not work, especially if their own code performs some
sort of (incorrect) validation of file paths before attempting to use them.
According to
https://docs.microsoft.com/en-us/dotnet/api/system.io.path.altdirectoryseparatorchar?view=net-5.0
"Windows supports either the forward slash (which is returned by the
AltDirectorySeparatorChar field) or the backslash (which is returned by the
DirectorySeparatorChar field) as path separator characters, while Unix-based
systems support only the forward slash."
Date: Mon, 23 Aug 2021 22:04:29 +0100
On Mon, 23 Aug 2021, at 20:45, Bill Mercer via curl-users wrote:
> I was referring to this...
> "E:/NC Voter Files/address/NCaddresses1.csv"
>
> The error message references an invalid path, and that's an invalid path.
Why do you say that? Why then does this command work (in a cmd terminal
window under Win 8.1):
C:\>dir "c:/windows/system32/"
(Here that lists 3399 files.)
Googling suggests that large parts of Windows have, for ages, worked
with forward slashes as well as backslashes.
GUI tools might not work, especially if their own code performs some
sort of (incorrect) validation of file paths before attempting to use them.
According to
https://docs.microsoft.com/en-us/dotnet/api/system.io.path.altdirectoryseparatorchar?view=net-5.0
"Windows supports either the forward slash (which is returned by the
AltDirectorySeparatorChar field) or the backslash (which is returned by the
DirectorySeparatorChar field) as path separator characters, while Unix-based
systems support only the forward slash."
-- Jeremy Nicoll - my opinions are my own. ----------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2021-08-23