mIRC Home    About    Download    Register    News    Help

Print Thread
#47510 06/09/03 12:13 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
how can i find *.* files in directory C:\ (+ subdirs) and remove them all?


_________
may death strike you.
#47511 06/09/03 12:18 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias find {
  set %i 1
  :next
  set %x $findfile(C:\,*.*,%i)
  if (%x == $null) goto done
  if (%x != $null) { echo %x }
  inc %i
  goto next
  :done
}


I wouldn't remove it though, you'd remove everything in C:\, why don't you just echo it, as shown above.

#47512 06/09/03 12:20 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
nope im making my own FDisk.. i need to make sure this script will delete everything it can..


_________
may death strike you.
#47513 06/09/03 12:22 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
And you want to do this because?

#47514 06/09/03 12:23 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
im installing win2k and i want to watch win98 freak out, when it finds missing files


_________
may death strike you.
#47515 06/09/03 12:23 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
deleting every file in C:\ is stupid but....
Code:
alias remdir {
.echo -q $findfile(C:\,*.*,0,.remove $1-)
}


new username: tidy_trax
#47516 06/09/03 12:24 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
not just C:\, every sub dir too


_________
may death strike you.
#47517 06/09/03 12:26 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Then by all means go for it,
change echo %x to remove %x
just don't come back and complain that something has gone horribly wrong, anyways, I don't think it will delete everything because it will most likely freeze.

#47518 06/09/03 12:26 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Doing that in mIRC would be ugly, it would require recursion. Just use the DOS deltree command.

#47519 06/09/03 12:27 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
bah if something goes wrong im going to do an fdisk anyway so it dont matter im just in the mood to see what win98 will do


_________
may death strike you.
#47520 06/09/03 12:27 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
should work, i just typed: //.echo -q $findfile(C:\,*.mp3,0,echo -a $1-), it echo'd things like: C:\Documents and Settings\MAT\My Documents\My Music\Tidy Trax - Tidy Boys vs Tidy Girls - Blow Ya Load.mp3
some files that are in use wont get deleted :\


new username: tidy_trax
#47521 06/09/03 12:29 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
soon as i get the disk im going to watch the fire works smile


_________
may death strike you.
#47522 06/09/03 01:31 AM
Joined: Jun 2003
Posts: 32
Ameglian cow
Offline
Ameglian cow
Joined: Jun 2003
Posts: 32
I guess im the only one who believes he might be abusing this..

#47523 06/09/03 01:43 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Nope, I think he is too. blush

#47524 06/09/03 01:44 AM
Joined: Aug 2003
Posts: 148
K
KoRn18 Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
not at all. i want to crash win98 since im going to fdisk any way and install win2k


_________
may death strike you.
#47525 06/09/03 07:12 AM
Joined: Aug 2003
Posts: 73
C
Babel fish
Offline
Babel fish
C
Joined: Aug 2003
Posts: 73
You know if you do this, it may do something besides delete data...


The blue monkey is out of its barrel...
#47526 06/09/03 10:09 AM
Joined: Sep 2003
Posts: 4
K
Self-satisified door
Offline
Self-satisified door
K
Joined: Sep 2003
Posts: 4
haha what a ignorant thing to do (imo) have fun lol !


Link Copied to Clipboard