mIRC Homepage
Posted By: KoRn18 find - 06/09/03 12:13 AM
how can i find *.* files in directory C:\ (+ subdirs) and remove them all?
Posted By: SladeKraven Re: find - 06/09/03 12:18 AM
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.
Posted By: KoRn18 Re: find - 06/09/03 12:20 AM
nope im making my own FDisk.. i need to make sure this script will delete everything it can..
Posted By: codemastr Re: find - 06/09/03 12:22 AM
And you want to do this because?
Posted By: KoRn18 Re: find - 06/09/03 12:23 AM
im installing win2k and i want to watch win98 freak out, when it finds missing files
Posted By: pheonix Re: find - 06/09/03 12:23 AM
deleting every file in C:\ is stupid but....
Code:
alias remdir {
.echo -q $findfile(C:\,*.*,0,.remove $1-)
}
Posted By: KoRn18 Re: find - 06/09/03 12:24 AM
not just C:\, every sub dir too
Posted By: SladeKraven Re: find - 06/09/03 12:26 AM
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.
Posted By: codemastr Re: find - 06/09/03 12:26 AM
Doing that in mIRC would be ugly, it would require recursion. Just use the DOS deltree command.
Posted By: KoRn18 Re: find - 06/09/03 12:27 AM
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
Posted By: pheonix Re: find - 06/09/03 12:27 AM
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 :\
Posted By: KoRn18 Re: find - 06/09/03 12:29 AM
soon as i get the disk im going to watch the fire works smile
Posted By: WatchMinister Re: find - 06/09/03 01:31 AM
I guess im the only one who believes he might be abusing this..
Posted By: SladeKraven Re: find - 06/09/03 01:43 AM
Nope, I think he is too. blush
Posted By: KoRn18 Re: find - 06/09/03 01:44 AM
not at all. i want to crash win98 since im going to fdisk any way and install win2k
Posted By: CyBot Re: find - 06/09/03 07:12 AM
You know if you do this, it may do something besides delete data...
Posted By: Kancer Re: find - 06/09/03 10:09 AM
haha what a ignorant thing to do (imo) have fun lol !
© mIRC Discussion Forums