MSFN Forum: How do I make a bat/cmd file delete itself when finished? - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How do I make a bat/cmd file delete itself when finished? Rate Topic: -----

#1 User is offline   smashly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 107
  • Joined: 09-April 05

Posted 08 January 2006 - 04:19 AM

Edit: Sorry about that , posted in wrong forum.
Maybe I shoul read the sticky at the top before posting huh :blushing:

This post has been edited by smashly: 08 January 2006 - 05:56 AM



#2 User is offline   BlueMe 

  • Member
  • PipPip
  • Group: Members
  • Posts: 146
  • Joined: 04-May 05

Posted 08 January 2006 - 01:39 PM

Anyway :
Attrib -r
DEL %0
EXIT

Someone please move this...

#3 User is offline   jcarle 

  • MSFN Master
  • Group: Developers
  • Posts: 2,572
  • Joined: 14-August 04

Posted 08 January 2006 - 07:53 PM

That last line will never execute. See, after you execute DEL %0, the batch in question is no longer available, so it never reads the last line. Also, the Attrib -r is superfluous. It's not necessary.

#4 User is offline   BlueMe 

  • Member
  • PipPip
  • Group: Members
  • Posts: 146
  • Joined: 04-May 05

Posted 08 January 2006 - 09:52 PM

"EXIT" yes, but "Attrib- r" maybe he want's to use the batch in some unattended stuff, and then the batch gets read-only, thats what happens with every file i put in the OEM folder..

This post has been edited by BlueMe: 08 January 2006 - 09:53 PM


#5 User is offline   smashly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 107
  • Joined: 09-April 05

Posted 09 January 2006 - 01:26 AM

Thank You for the answer BlueMe.
Once again sorry for posting in the wrong section , won't happen again.
Some1 Please DEL %0 this misplaced thread.

Cheers

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy