Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 173 Posts 69 Joined 2007-08-07 22:40 19-year member UID 94807 Gender Male
Status Offline
How can a BAT file kill itself after it runs successfully?
What I want is for a batch file to delete itself after it runs. Can that be done?
One of my programs uses a batch file in order to implement self-updating,
and I don't want this batch file to be left behind.
I want it to delete itself as soon as it finishes running. How can I do that?
Credits 1,039 Posts 897 Joined 2009-03-01 15:34 17-year member UID 140302 Gender Male From 在地狱中仰望天堂
Status Offline
Originally posted by zaixinxiangnian at 2010-4-5 12:49:
del "%~0" and del %0 Could an expert please explain, what's the difference between the two, and which one should be used