Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
-o oddities in windows batch files #6849
Comments
|
You may need to escape the |
|
Correct code:
|
i'm using a batch file in windows to change the filename to just the title and extension - basically remove the %(id)s.
here's what i have in the batch file:
set /p address=Enter video site address:
youtubedl\youtube-dl.exe -v -o '%(title)s.%(ext)s' %address%
When attempting to run, i get the error:
"youtube-dl.exe: error: You must provide at least one URL."
When running the batch file without the -o option, it runs fine (but appends the %(id)s, which is what i'm trying to avoid).
running the same command directly in the command prompt works fine. any ideas why it's not working when run from a batch file?
thanks!
-v debug:
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-o', u"'address"]
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.09.09
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: none
[debug] Proxy map: {}
Usage: youtube-dl.exe [OPTIONS] URL [URL...]
youtube-dl.exe: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.