Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and download in one .bat file #26258

Closed
greyboxgt opened this issue Aug 6, 2020 · 2 comments
Closed

Update and download in one .bat file #26258

greyboxgt opened this issue Aug 6, 2020 · 2 comments
Labels

Comments

@greyboxgt
Copy link

@greyboxgt greyboxgt commented Aug 6, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE

I am trying to make a script that would update my youtube-dl.exe and then download some titles. Here is my .bat file:

youtube-dl -U --no-check-certificate
mydownload.bat

The problem is that mydownload.bat command starts before the update is finished and the file handle is closed. Because access to youtube-dl.exe is denied at that time, I end up with my old youtube-dl.exe and new youtube-dl.exe.new. Is there a way to force mydownload.bat in the script to wait until the update process is finished?

@greyboxgt greyboxgt added the question label Aug 6, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 7, 2020

Read doc on batch files for whatever delay capabilities it provides.

@dstftw dstftw closed this Aug 7, 2020
@greyboxgt
Copy link
Author

@greyboxgt greyboxgt commented Aug 7, 2020

youtube-dl -U --no-check-certificate generates a batch file that I cannot control.
I can add some delay in mydownload.bat but this would be a guessing game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.