Loading ...
Sorry, an error occurred while loading the content.

use of destroy command

Expand Messages
  • dpasseng
    I decided to use a scratch document for something I was doing. Because of a bug in notetab s handling of the replace function (see prior email) the clip
    Message 1 of 1 , Mar 13, 2006
    • 0 Attachment
      I decided to use a "scratch" document for something I was doing.
      Because of a bug in notetab's handling of the replace function (see
      prior email) the clip derailed! It got loose and left notetab and
      then kept running. The destroy function (contained in a loop) just
      kept on running and running and running.

      From Help:

      ^!DestroyDoc [DocumentName]
      Closes the current document or the specified document without
      prompting and deletes the corresponding file from disk if it exists
      (the file is actually sent to the recycle bin).

      That got me to thinking that I should probably always do some test on
      destroy before running it. First I wasn't using a file name ...
      perhaps I should.

      First question:
      How do I get the full path/filename.ext for a file I am currently in?

      I find this:
      ^$GetFileName(FileName)$
      Returns the name and extension of FileName (without path). Since
      version 4.8, this function works both on Windows file names and URLs.

      and this:
      ^$GetPath(FileName)$
      Returns the path segment of FileName (always ends with backslash).
      Since version 4.8, this function works both on Windows file names and
      URLs.

      Do I have to combine them?

      What techniques to you all use to contain your destroydoc commands?
    Your message has been successfully submitted and would be delivered to recipients shortly.