Having no success at all with the -o command #2870

Closed
opened 2026-02-20 23:09:51 -05:00 by deekerman · 4 comments
Owner

Originally created by @1235a on GitHub (Aug 17, 2014).

I have tried using -simulate and --get-filename to no success with the youtube-dl.exe for windows 8.1. I have the latest version installed. Any format I try with -o or --output throws a variety of errors with batch files or multiple/single youtube links in the .bat file. I have seen it return just "ext" as the file name along with "error multiple links with the same name" and others. What is the proper verbose for:
-o /%(uploader)s/%(title)s:%(id)s.(ext)s
? I've tried many variations and none work.

Originally created by @1235a on GitHub (Aug 17, 2014). I have tried using -simulate and --get-filename to no success with the youtube-dl.exe for windows 8.1. I have the latest version installed. Any format I try with -o or --output throws a variety of errors with batch files or multiple/single youtube links in the .bat file. I have seen it return just "ext" as the file name along with "error multiple links with the same name" and others. What is the proper verbose for: -o /%(uploader)s/%(title)s:%(id)s.(ext)s ? I've tried many variations and none work.
Author
Owner

@phihag commented on GitHub (Aug 17, 2014):

Please post at least one variation in full, including the error you get. Note that the path should usually not start with / on Windows. Either start with the first path component (then it's local to the current directory), or with C:, or with \\. Additionally, I do believe that colons (:) are not allowed in Windows file names since they separate drive label and path.

@phihag commented on GitHub (Aug 17, 2014): Please post at least one variation in full, including the error you get. Note that the path should usually not start with `/` on Windows. Either start with the first path component (then it's local to the current directory), or with `C:`, or with `\\`. Additionally, I do believe that colons (`:`) are not allowed in Windows file names since they separate drive label and path.
Author
Owner

@1235a commented on GitHub (Aug 17, 2014):

C:\Users\massi_000\Desktop\Wii\YouTube>youtube-dl --batch-file 1.txt -o "c:\YouT
ube(title)s-(ext)s" --dateafter 20140816 --no-playlist --ignore-errors --format
bestaudio --restrict-filenames
ERROR: fixed output name but more than one file to download

I see the problem, batch files can't use the '%' sign. if I copy and paste the code it works. Thanks for the other information though.

@1235a commented on GitHub (Aug 17, 2014): C:\Users\massi_000\Desktop\Wii\YouTube>youtube-dl --batch-file 1.txt -o "c:\YouT ube(title)s-(ext)s" --dateafter 20140816 --no-playlist --ignore-errors --format bestaudio --restrict-filenames ERROR: fixed output name but more than one file to download I see the problem, batch files can't use the '%' sign. if I copy and paste the code it works. Thanks for the other information though.
Author
Owner

@phihag commented on GitHub (Aug 17, 2014):

Batch files can include percent signs just fine, you just need to escape them.

@phihag commented on GitHub (Aug 17, 2014): Batch files can include percent signs just fine, [you just need to escape them](http://support.microsoft.com/kb/75634).
Author
Owner

@joshuafarren commented on GitHub (Sep 11, 2018):

@phihag That link doesn't work anymore.
For those coming from google (like me) escape percent signs in batch with another percent
i.e
%%(title)s

@joshuafarren commented on GitHub (Sep 11, 2018): @phihag That link doesn't work anymore. For those coming from google (like me) escape percent signs in batch with another percent i.e `%%(title)s`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#2870
No description provided.