MSFN Forum: See how this file erase itself ! - MSFN Forum

Jump to content



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

See how this file erase itself ! Real great in the Startup Folder ! Rate Topic: -----

#1 User is offline   Christine_ts 

  • Newbie
  • Group: Members
  • Posts: 36
  • Joined: 29-October 08

Posted 18 November 2008 - 03:06 PM

As an Old Dos Girl this was impossible in Batch-Jobs
but see, here in Xp is it possible !


This is the file i have in my Start Menu\Programs\Startup Folder.
The file is named: Startup.cmd

Cls
@Echo Off
RD /S /Q "%Userprofile%\Favorites\links"
Del /F /Q "%Userprofile%\Start Menu\Programs\*.lnk"
RD /S /Q "%Userprofile%\Start Menu\Programs\Accessories"

Del /F "%Userprofile%\Start Menu\Programs\Startup\Startup.cmd"
Exit

This post has been edited by Yzöwl: 18 November 2008 - 04:33 PM
Reason for edit: Code tags added



#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 November 2008 - 04:29 PM

Well the clear screen isn't required at the beginning since the batch would open a new console, you dont need to exit at the end if the file's already gone and the last line could then just say
Del %0
But I'm sure someone may benefit from the information, after all most of us want to learn something whilst here!

#3 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,105
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 19 November 2008 - 02:23 PM

Isn't this the good ol' self deleting batch? :unsure:
http://www.msfn.org/board/force-directory-...3.html&st=3
http://catch22.net/tuts/selfdel

It should work on 9x too.

jaclaz

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 - 2011 msfn.org
Privacy Policy