Hi folks,

i found an irritating behaviour, when deleting files in a repeat-loop.

Fortunately i found a solution fr that, too.

In case someone is interested:

btn-script:
...
set the directory to soundordner()
get the files
  repeat with i = 1 to the num of lines of it
    if there is a file (soundordner() & line i of it) then
      delete file (soundordner() & line i of it)
    end if
  end repeat
...

With that script, i had to click the btn several times
to get rid of ALL the files in that folder. (?)
(Yes, i even waited a couple of minutes, but 1 file was
always left in that folder.

Now i added just 1 short wait-statement and the files
are gone with ONE click.

...
  repeat with i = 1 to the num of lines of it
    if there is a file (soundordner() & line i of it) then
      delete file (soundordner() & line i of it)
      wait 5      ##!!!!!!!!!!!!!!!
    end if
  end repeat
...

Maybe this is helpful to others, too.

(Can somebody explain why this workaround is necessary???)


Regards


Klaus Major <[EMAIL PROTECTED]>
MetaScape GmbH


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to