curl / Mailing Lists / curl-users / Single Mail
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: writing NTFS streams by -o

From: Jeremy Nicoll via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 30 Jul 2019 12:46:03 +0100

On Tue, 30 Jul 2019, at 12:34, Petr Lázňovský via curl-users wrote:
> On 7/27/2019 4:11 PM, Petr L??z??ovsk?? via curl-users wrote:
> > Trying to save downloaded file on Windows 7 including additional data into NTFS stream by following way:
>
> > curl -o "file.ext:ntfs_stream_text" "%url%"

> But I am saving file _AND_ ntfs_stream_data (see semicolon in my
> example), why zero bytes file is saved when curl report "Received
> 63528", where the received data goes?

I can't help wondering if the positioning of the double quotes on that
part of the command is working the way you want.

I might be inclined to write to the file normally, then if curl's rc was ok
follow that with something like

echo Data from %url% > "yourfile:ntfs_stream_text"

based on the fact that a commandline command like the following
works ok for updating an ADS (in fact to 'unblock' a just-downloaded
file)

echo.> "C:\Users\me\Downloads\xyz.jpg:Zone.Identifier:$DATA"

-- 
Jeremy Nicoll - my opinions are my own.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-07-30