Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How to keep DOS box open after command completes


  • Please log in to reply
5 replies to this topic

#1 Cynthia Moore

Cynthia Moore

  • Members
  • 277 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:08:53 PM

Posted 24 January 2018 - 02:38 AM

I have been using youtube-dl (https://youtube-dl.org/) from the DOS box. It has help information via the command:

youtube-dl --help

It spits out several screens worth of information, but the DOS box closes immediately so I don't have time to read it. This also happens when downloading a video if there is an error. The error flashes by quickly and then the DOS Box closes.

 

How can I keep it open? I've tried the "/k" switch in all kinds of configurations,

youtube-dl /k "https://www.xyz....."
youtube-dl "https://www.xyz....." /k
youtube-dl "https://www.xyz..... /k"

but nothing works..

 


Running Win 10 & Office 365.


BC AdBot (Login to Remove)

 


#2 sasschary

sasschary

  • Malware Study Hall Senior
  • 753 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:A galaxy far, far away...
  • Local time:11:53 PM

Posted 24 January 2018 - 03:23 AM

Hi, Cynthia Moore,

 

I would try putting the command into a .bat file with a pause command afterward, which should make the dialog wait for you to press a key before it will close. To do so, you would just copy/paste the command into Notepad, then save it as [filename].bat and then make sure that the save as type box is set to all files and not text document. In this case, this is probably what you'd want to save:

@ECHO OFF
youtube-dl /k "https://www.xyz....."
pause

Where @ECHO OFF will suppress showing the commands run in each line, the second line is the command to run the program, and pause will make the dialog wait for you to press a key before closing.

 

Sasschary



#3 mightywiz

mightywiz

  • Members
  • 704 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:08:53 PM

Posted 25 January 2018 - 06:08 PM

why don't you open a command prompt window and then type your command.

 

I assume your just entering it in the run bar, correct?   if you open the command window and run commands the windows will stay open until you close it.

 

in the run bar type "cmd.exe" and the command window will open.


Edited by mightywiz, 25 January 2018 - 06:08 PM.


#4 Cynthia Moore

Cynthia Moore
  • Topic Starter

  • Members
  • 277 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:08:53 PM

Posted 25 January 2018 - 06:55 PM

why don't you open a command prompt window and then type your command.

 

I assume your just entering it in the run bar, correct?   if you open the command window and run commands the windows will stay open until you close it.

 

in the run bar type "cmd.exe" and the command window will open.

Yes, I have been typing "win+r" and then entering the commands. I copy the URL to the clipboard, then type "youtube-dl" and paste the URL.

 

I didn't know about cmd.exe. I just tried it, but apparently it won't let me paste from the clipboard. When I type Ctrl+v, it shows "^V". Is there any way to paste text? Some of these URLs are kinda long and I make a lot of typing mistakes. :-(


Running Win 10 & Office 365.


#5 DavidLMO

DavidLMO

  • Members
  • 50 posts
  • OFFLINE
  •  
  • Local time:10:53 PM

Posted 25 January 2018 - 07:09 PM

In command prompt window ...

 

Right Click

Paste

 

[More command available there as well.]

 

Ctrl-V doesn't work


Edited by DavidLMO, 25 January 2018 - 07:10 PM.


#6 Cynthia Moore

Cynthia Moore
  • Topic Starter

  • Members
  • 277 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:08:53 PM

Posted 25 January 2018 - 11:21 PM

In command prompt window ...
 
Right Click
Paste
 
[More command available there as well.]
 
Ctrl-V doesn't work

Outstanding, thanks so much.

 

On my system, just the right-click executes the paste.


Running Win 10 & Office 365.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users