aboutsummaryrefslogtreecommitdiff
path: root/network/youtube-dl/youtube-dl.1
diff options
context:
space:
mode:
Diffstat (limited to 'network/youtube-dl/youtube-dl.1')
-rw-r--r--network/youtube-dl/youtube-dl.110
1 files changed, 10 insertions, 0 deletions
diff --git a/network/youtube-dl/youtube-dl.1 b/network/youtube-dl/youtube-dl.1
index ad5aa906d7791..22df3a3ec30c8 100644
--- a/network/youtube-dl/youtube-dl.1
+++ b/network/youtube-dl/youtube-dl.1
@@ -1095,6 +1095,16 @@ or &, such as when transferring the downloaded filename to a Windows
system or the filename through an 8bit\-unsafe channel.
In these cases, add the \f[C]\-\-restrict\-filenames\f[] flag to get a
shorter title:
+.SS Output template and Windows batch files
+.PP
+If you are using output template inside a Windows batch file then you
+must escape plain percent characters (\f[C]%\f[]) by doubling, so that
+\f[C]\-o\ "%(title)s\-%(id)s.%(ext)s"\f[] should become
+\f[C]\-o\ "%%(title)s\-%%(id)s.%%(ext)s"\f[].
+However you should not touch \f[C]%\f[]\[aq]s that are not plain
+characters, e.g.
+environment variables for expansion should stay intact:
+\f[C]\-o\ "C:\\%HOMEPATH%\\Desktop\\%%(title)s.%%(ext)s"\f[].
.SS Output template examples
.PP
Note on Windows you may need to use double quotes instead of single.