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.
Automatically close Terminal window upon successful download? #10220
Comments
|
do this as follows done |
|
for your example it would be rename the test.txt to test.bat |
|
Thanks @siddht1 AFAIK it's impossible to close the terminal inside application. A shell script is the right way. |
|
Many thanks for the example, but I couldn't get your provided example file to work, I use the command: youtube-dl --batch-file test.bat I received the following error: ERROR: u'@echo off' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:@echo off" ) to search YouTube I tried of course without echo off but it wouldn't work either. |
|
Forgot to ask, are you using Windows? If so, just double click on |
|
No, OS X, I skimmed past that in the documentation. (Terminal is OS X, it's Command in Windows as I recall) |
|
This should work:
|
|
That it does. Many thanks. For clarification: this is for OS X
Now all the videos in the text (batch) file will download and the Terminal window will close. note: for the Terminal window to actually close you will need to follow this site's advice: http://superuser.com/questions/160473/avoiding-process-completed-prompt-after-terminal-script-ends-on-mac-os-x |
|
I guess you mean |
|
Updated! |
|
ok i thought you asked for windows as the title was "Automatically close Terminal window upon successful download?", i have the bash script for linux its similar as @yan12125 example |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2016.08.01. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add
-vflag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Description of your issue, suggested solution and other information
Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue required an account credentials please provide them or explain how one can obtain them.
I would like to know if it it possible to have Terminal automatically close the Window in use after it has successfully downloaded a batch file please?