[Cosmetics] Updating youtube-dl.exe #4731

Open
opened 2026-02-21 02:20:13 -05:00 by deekerman · 5 comments
Owner

Originally created by @Reino17 on GitHub (May 25, 2015).

While updating youtube-dl the temporary youtube-dl-updater.bat performs this task:

@echo off
echo Waiting for file handle to be closed ...
ping 127.0.0.1 -n 5 -w 1000 > NUL
move /Y "D:\Storage\Media\Binaries\youtube-dl.exe.new" "D:\Storage\Media\Binaries\youtube-dl.exe" > NUL
echo Updated youtube-dl to version 2015.01.10.2.
start /b "" cmd /c del "%~f0"&exit /b"

Now for some reason the move-command (or something else?) causes a new commandprompt to appear, followed by the final echo + a new linefeed:

D:\Storage\Media\Binaries>youtube-dl.exe -U
Updating to version 2015.05.20 ...
Waiting for file handle to be closed ...

D:\Storage\Media\Binaries>Updated youtube-dl to version 2015.05.20.

D:\Storage\Media\Binaries>

You'd always have to press ENTER for the commandprompt to appear again.

When I save the temporary bat-file and run it localy on a dummy youtube-dl.exe.new and youtube-dl.exe.new it performs as expected:

D:\Storage\Media\Binaries>youtube-dl-updater.bat
Waiting for file handle to be closed ...
Updated youtube-dl to version 2015.01.10.2.

D:\Storage\Media\Binaries>

The final echo is displayed and the commandprompt appears again.
This behaviour is a but confusing, especially in batchscripts where I use youtube-dl.exe. Is this normal?

Originally created by @Reino17 on GitHub (May 25, 2015). While updating youtube-dl the temporary _youtube-dl-updater.bat_ performs this task: ``` bat @echo off echo Waiting for file handle to be closed ... ping 127.0.0.1 -n 5 -w 1000 > NUL move /Y "D:\Storage\Media\Binaries\youtube-dl.exe.new" "D:\Storage\Media\Binaries\youtube-dl.exe" > NUL echo Updated youtube-dl to version 2015.01.10.2. start /b "" cmd /c del "%~f0"&exit /b" ``` Now for some reason the _move_-command (or something else?) causes a new commandprompt to appear, followed by the final echo + a new linefeed: ``` bat D:\Storage\Media\Binaries>youtube-dl.exe -U Updating to version 2015.05.20 ... Waiting for file handle to be closed ... D:\Storage\Media\Binaries>Updated youtube-dl to version 2015.05.20. D:\Storage\Media\Binaries> ``` You'd always have to press ENTER for the commandprompt to appear again. When I save the temporary bat-file and run it localy on a dummy _youtube-dl.exe.new_ and _youtube-dl.exe.new_ it performs as expected: ``` bat D:\Storage\Media\Binaries>youtube-dl-updater.bat Waiting for file handle to be closed ... Updated youtube-dl to version 2015.01.10.2. D:\Storage\Media\Binaries> ``` The final echo is displayed and the commandprompt appears again. This behaviour is a but confusing, especially in batchscripts where I use youtube-dl.exe. Is this normal?
Author
Owner

@Reino17 commented on GitHub (Jun 25, 2015):

@yan12125 wrote in #5994:

If you will, try it on the next update.

Still the same:

D:\Storage\Media\Binaries>youtube-dl.exe -U
Updating to version 2015.06.25 ...
Waiting for file handle to be closed ...

D:\Storage\Media\Binaries>Updated youtube-dl to version 2015.06.25.
_ (<-- prompt)

Or do I have to wait for yet another update to see any changes? Hasn't this issue been fixed with a commit, like every other issue?

@Reino17 commented on GitHub (Jun 25, 2015): @yan12125 wrote in #5994: > If you will, try it on the next update. Still the same: ``` D:\Storage\Media\Binaries>youtube-dl.exe -U Updating to version 2015.06.25 ... Waiting for file handle to be closed ... D:\Storage\Media\Binaries>Updated youtube-dl to version 2015.06.25. _ (<-- prompt) ``` Or do I have to wait for yet another update to see any changes? Hasn't this issue been fixed with a commit, like every other issue?
Author
Owner

@yan12125 commented on GitHub (Jun 25, 2015):

@pargitejas's issue is slightly different. He/She is missing the prompt, and I guess he/she needs an extra Enter. Your issue is not solved yet, and I'll try to have a look these days.

@yan12125 commented on GitHub (Jun 25, 2015): @pargitejas's issue is slightly different. He/She is missing the prompt, and I guess he/she needs an extra Enter. Your issue is not solved yet, and I'll try to have a look these days.
Author
Owner

@Scripter17 commented on GitHub (Nov 17, 2020):

I don't mean to be rude, but why is this still a problem?
Just updated 2020.11.17 to 2020.11.18 and got this output:

Microsoft Windows [Version 10.0.19041.630]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\James>youtube-dl -U
Updating to version 2020.11.18 ...
Waiting for file handle to be closed ...

C:\Users\James>Updated youtube-dl to version 2020.11.18.
@Scripter17 commented on GitHub (Nov 17, 2020): I don't mean to be rude, but why is this still a problem? Just updated 2020.11.17 to 2020.11.18 and got this output: ``` Microsoft Windows [Version 10.0.19041.630] (c) 2020 Microsoft Corporation. All rights reserved. C:\Users\James>youtube-dl -U Updating to version 2020.11.18 ... Waiting for file handle to be closed ... C:\Users\James>Updated youtube-dl to version 2020.11.18. ```
Author
Owner

@ibex-are-goats commented on GitHub (Jan 16, 2021):

I'm getting this too!

@ibex-are-goats commented on GitHub (Jan 16, 2021): I'm getting this too!
Author
Owner

@pukkandan commented on GitHub (May 22, 2021):

Related: https://github.com/ytdl-org/youtube-dl/issues/28488#issuecomment-808723707

@pukkandan commented on GitHub (May 22, 2021): Related: https://github.com/ytdl-org/youtube-dl/issues/28488#issuecomment-808723707
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-ytdl-org#4731
No description provided.