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

Re: VolumeID

Expand Messages
  • Mark Halsall
    ... a:)$;25;11)$)$= BACKUP01 ... last ... is ... Hi hrs and Dave, Thanks, I have it working now. I can t quite see how the first problem could relate to DOS
    Message 1 of 3 , Oct 21, 2001
    • 0 Attachment
      > Mark Halsall wrote:
      > >
      > > Thank you Dave,
      > >
      > > For example, if my backup disk is labelled BACKUP01, then
      > >
      > > ^!If ^$StrTrim(^$StrCopy(^$GetDosOutput(vol
      a:)$;25;11)$)$="BACKUP01"
      > >
      > > works fine, but not
      > >
      > > ^!If ^$StrCopy(^$GetDosOutput(vol a:)$;25;11)$="BACKUP01 "
      > >
      > > This is not a problem - but I can't see what's wrong with this
      last
      > > one. The disk label allows 11 characters and I have three spaces
      > > after BACKUP01.
      > >
      > > Anyway, this is academic. My problem is my clip hangs if no disk
      is
      > > inserted - clearly NTP cannot evaluate it if the floppy is not
      > > inserted.
      > >
      > > Even ^!IfError on the following line does not seem to help.
      > >
      > > How does one test to confirm that a floppy is inserted?
      > >
      > > Regards,
      > > MarkH
      > >

      > Hi Mark and Dave,
      >
      > On the first point, I believe with a little research you'll find
      > DOS doesn't allow spaces in a Label name. That's probably why
      > this fails;
      >
      > ^!If ^$StrCopy(^$GetDosOutput(vol a:)$;25;11)$="BACKUP01 ".
      >
      > On the second point, testing for presence of a floppy. I haven't
      > tried it in NoteTab clips but I have done it in batch files. You
      > probably can find a combination that works. Try something like;
      >
      > ^!IfFileExist a:\. DO THIS ELSE DO THIS -- The period
      > represents anything in a:\root
      >
      > ^!IfFileExist "FileName" GoToLabelTrue [ELSE GoToLabelFalse]
      >
      > ^!IfPathExist "PathName" GoToLabelTrue [ELSE GoToLabelFalse]
      >
      > If that doesn't work try it using a zero byte or low byte trigger
      > file.
      >
      > ^!IfFileExist a:\DISK.OK, or something like that. Just
      >
      > ^!IfPathExist "PathName" GoToLabelTrue [ELSE GoToLabelFalse]
      >
      > ^!IfPathExist a:\. DO THIS ELSE DO THIS -- with IfPathExist you
      > may not need a zero byte file, just a formatted floppy or, (South
      > African 'stiffy').
      >
      > Just remember to leave an escape route out of the test.
      >
      > hrs

      Hi hrs and Dave,

      Thanks, I have it working now.

      I can't quite see how the first problem could relate to DOS not
      supporting spaces, since the following works:

      ^!Set %floppy%="BACKUP01 "
      ^!If ^$StrCopy(^$GetDosOutput(vol a:)$;25;11)$=^%floppy% SKIP_2 ELSE
      NEXT
      ^!Prompt "You have not inserted the right floppy!"
      ^!GoTo END

      As for the second problem, I don't really understand the a:\. and
      cannot get it to work. Isn't the period for REGEX? Anyway the
      following works:

      ^!IfFileExist a:\*.* SKIP_2 ELSE NEXT
      ^!Prompt "You're supposed to insert the floppy disk - twit!"
      ^!GoTo END

      Anyway, thanks again. I only mention the above as "curiosities".

      MarkH
    Your message has been successfully submitted and would be delivered to recipients shortly.