From 5620d2cc78c018f6ae15ba9aab371aa388146df0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 Aug 2020 08:31:36 +0200 Subject: curl: add --output-dir Works with --create-dirs and with -J Add test 3008, 3009, 3011, 3012 and 3013 to verify. Closes #5637 --- docs/TODO | 7 ------- docs/cmdline-opts/Makefile.inc | 1 + docs/cmdline-opts/output-dir.d | 18 ++++++++++++++++++ docs/options-in-versions | 1 + 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 docs/cmdline-opts/output-dir.d (limited to 'docs') diff --git a/docs/TODO b/docs/TODO index 4f9b57bf6..874dba874 100644 --- a/docs/TODO +++ b/docs/TODO @@ -159,7 +159,6 @@ 18.19 expand ~/ in config files 18.20 host name sections in config files 18.21 retry on the redirected-to URL - 18.22 Add flag to specify download directory 18.23 Set the modification date on an uploaded file 18.24 Use multiple parallel transfers for a single download @@ -1122,12 +1121,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. See https://github.com/curl/curl/issues/5462 -18.22 Add flag to specify download directory - - A directory name to basically prepend to the file name -O and -o use. Saves - user from having to manually "cd" to the directory. Especially useful for - command lines with multiple -O and different download directories. - 18.23 Set the modification date on an uploaded file For SFTP and posssibly FTP, curl could offer an option to set the diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc index 6a7b953bc..aa1acabe0 100644 --- a/docs/cmdline-opts/Makefile.inc +++ b/docs/cmdline-opts/Makefile.inc @@ -127,6 +127,7 @@ DPAGES = \ ntlm.d ntlm-wb.d \ oauth2-bearer.d \ output.d \ + output-dir.d \ parallel-immediate.d \ parallel-max.d \ parallel.d \ diff --git a/docs/cmdline-opts/output-dir.d b/docs/cmdline-opts/output-dir.d new file mode 100644 index 000000000..40bcb78ee --- /dev/null +++ b/docs/cmdline-opts/output-dir.d @@ -0,0 +1,18 @@ +Long: output-dir +Arg: +Help: Directory to save files in +Added: 7.72.0 +See-also: remote-name remote-header-name +--- + +This option specifies the directory in which files should be stored, when +--remote-name or --output are used. + +The given output directory is used for all URLs and output options on the +command line, up until the first --next. + +If the specified target directory doesn't exist, the operation will fail +unless --create-dirs is also used. + +If this option is used multiple times, the last specified directory will be +used. diff --git a/docs/options-in-versions b/docs/options-in-versions index 1a27306ae..2945e1373 100644 --- a/docs/options-in-versions +++ b/docs/options-in-versions @@ -127,6 +127,7 @@ --ntlm-wb 7.22.0 --oauth2-bearer 7.33.0 --output (-o) 4.0 +--output-dir 7.72.0 --parallel (-Z) 7.66.0 --parallel-immediate 7.68.0 --parallel-max 7.66.0 -- cgit v1.2.1