Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

How do I make a bat/cmd file delete itself when finished?

- - - - -

  • Please log in to reply
4 replies to this topic

#1
smashly

smashly

    Member

  • Member
  • PipPip
  • 107 posts
  • Joined 09-April 05
Edit: Sorry about that , posted in wrong forum.
Maybe I shoul read the sticky at the top before posting huh :blushing:

Edited by smashly, 08 January 2006 - 05:56 AM.



How to remove advertisement from MSFN

#2
BlueMe

BlueMe

    Member

  • Member
  • PipPip
  • 146 posts
  • Joined 04-May 05
Anyway :
Attrib -r
DEL %0
EXIT
Someone please move this...

#3
jcarle

jcarle

    MSFN Master

  • Developer
  • 2,579 posts
  • Joined 14-August 04
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.
Posted Image
Posted Image

#4
BlueMe

BlueMe

    Member

  • Member
  • PipPip
  • 146 posts
  • Joined 04-May 05
"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..

Edited by BlueMe, 08 January 2006 - 09:53 PM.


#5
smashly

smashly

    Member

  • Member
  • PipPip
  • 107 posts
  • Joined 09-April 05
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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users