mIRC Homepage
Posted By: Lint Copy directories - 26/11/05 10:57 PM
I want that will copy the name of the directory and only include a .nfo file from that directory.

Havent really gotten that far, atm its just copy the directories to a .txt file, but it includes the entire path, how would I go about to only copy the directory name?

.Copy to the txt file:{
set %folder $?="What is path?"
$finddir(%folder,*DVD*,0,write dvd.txt $1-)
}
Posted By: SladeKraven Re: Copy directories - 27/11/05 08:09 AM
Code:
alias test {
  write -c dvd.txt
  var %x = 1, %folder = $sdir=" Select a folder.. "
  while (%x <= $findfile(%mp3dir,*.nfo,0)) {
    write dvd.txt $findfile(%mp3dir,*.nfo,%x)
    inc %x
  }
}


-Andy
Posted By: FiberOPtics Re: Copy directories - 27/11/05 02:46 PM
Is it supposed to overwrite dvd.txt with each time this command is issued? Right now it does this.

Code:
alias copydirs {
  var %f = f $+ $ticks, %total, %folder = $$sdir($mircdir,Select a folder)
  .fopen -o %f dvd.txt
  if ($ferr) goto error
  %total = $finddir(%folder,*DVD*,0,.fwrite -n %f $gettok($1-,-1,92))
  echo -ac info * /copydirs: %total directories written to file 
  :error
  if ($fopen(%f)) .fclose %f
}
Posted By: FiberOPtics Re: Copy directories - 27/11/05 02:53 PM
You don't have an %mp3dir variable, and I have also stressed the fact in the past, what a bad idea it is to use $findfile in a loop, it should never ever be used as it's one of the most inefficient things you can do in mIRCScripting.
Posted By: Lint Re: Copy directories - 25/11/06 09:58 PM
How would I go about copying all the directories in a folder?
© mIRC Discussion Forums