mIRC Home    About    Download    Register    News    Help

Print Thread
#47510 06/09/03 12:13 AM
K
KoRn18
KoRn18
K
how can i find *.* files in directory C:\ (+ subdirs) and remove them all?

#47511 06/09/03 12:18 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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
K
KoRn18
KoRn18
K
nope im making my own FDisk.. i need to make sure this script will delete everything it can..

#47513 06/09/03 12:22 AM
C
codemastr
codemastr
C
And you want to do this because?

#47514 06/09/03 12:23 AM
K
KoRn18
KoRn18
K
im installing win2k and i want to watch win98 freak out, when it finds missing files

#47515 06/09/03 12:23 AM
P
pheonix
pheonix
P
deleting every file in C:\ is stupid but....
Code:
alias remdir {
.echo -q $findfile(C:\,*.*,0,.remove $1-)
}

#47516 06/09/03 12:24 AM
K
KoRn18
KoRn18
K
not just C:\, every sub dir too

#47517 06/09/03 12:26 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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
C
codemastr
codemastr
C
Doing that in mIRC would be ugly, it would require recursion. Just use the DOS deltree command.

#47519 06/09/03 12:27 AM
K
KoRn18
KoRn18
K
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

#47520 06/09/03 12:27 AM
P
pheonix
pheonix
P
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 :\

#47521 06/09/03 12:29 AM
K
KoRn18
KoRn18
K
soon as i get the disk im going to watch the fire works smile

#47522 06/09/03 01:31 AM
W
WatchMinister
WatchMinister
W
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,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Nope, I think he is too. blush

#47524 06/09/03 01:44 AM
K
KoRn18
KoRn18
K
not at all. i want to crash win98 since im going to fdisk any way and install win2k

#47525 06/09/03 07:12 AM
C
CyBot
CyBot
C
You know if you do this, it may do something besides delete data...

#47526 06/09/03 10:09 AM
K
Kancer
Kancer
K
haha what a ignorant thing to do (imo) have fun lol !


Link Copied to Clipboard