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

Re: [Clip] Backing up files

Expand Messages
  • Mark Halsall
    Thanks Alan & Dave, ... backup of. more difficult to snag just one clip, but it could be done. My problem here is including the header (H=whatever). The best
    Message 1 of 8 , Oct 1, 2001
    • 0 Attachment
      Thanks Alan & Dave,

      > >2) How do you backup a clip? Yes, I'm serious.

      > easy to back up a file, a .clb which includes the clip you want
      backup of. more difficult to snag just one clip, but it could be
      done.

      My problem here is including the header (H=whatever). The best I can
      think of is to open the .clb and copy and paste the clip - which seems
      a bit primitive.


      > >3) Is there a clip to do the same as Windows Briefcase?

      > synchronizer, right? probably better off with a file synchronizer
      software. synchronizer was discussed recently on ntb off-topic list.

      I haven't looked into this, but I'd have thought it simple to
      overwrite only if both the file dates and sizes are different. I
      guess there's more to it.

      Many thanks,
      MarkH
    • Alan C.
      Hi Mark, 1. (see below too) with clip editor open, can right click in editor window choose copy all and then paste and save the one clip somewhere or turn on
      Message 2 of 8 , Oct 1, 2001
      • 0 Attachment
        Hi Mark,

        1. (see below too) with clip editor open, can right click in editor window
        choose copy all and then paste and save the one clip somewhere or turn on
        pasteboard doc and capture there. or go to Ntab clip repository and get
        Larry's Clipstor clip, a clipboard/pasteboard capture/auto save (I think) clip.

        or

        2. I just remembered that I had formerly written the following. After
        you've "inserted" the outline then the clip: 1. makes, 2. names, and 3.
        saves a text file of each of the outline's topics. (10 topics at a time
        then can continue where had left off). It could be modified to do what U
        want. .otl and .clb similar, but Unlike an outline, a .clb (clip
        library) can just be opened, able to do so without the need for the
        insertion procedure.

        H="OTL ea topic to text"
        ; 1st, need to open the outline as a text file: create a
        ; new file in NTab then click Document | Insert File... and
        ; browse to the outline you want to open.
        ; then place cursor above 1st "H=" then launch this clip
        ; This clip then makes ea OTL topic into an
        ; individual text file
        ^!ClearVariables
        ; ^!Set %begin%=^$GetRow$
        ^!Set %cnt%=0
        :loop
        ^!Find "^pH=" SIT
        ^!IfError fwd
        ^!Delay 2
        ^!Set %row%=^$GetRow$
        ^!Append %rowlist%=^%row%:1^%NL%
        ^!Jump SELECT_END
        ^!Select EOL
        ^!Set %hdr%=^$GetSelection$
        ^!Set %hdr%=^$StrReplace(\;_;^%hdr%;False;False)$
        ^!Set %hdr%=^$StrReplace(/;_;^%hdr%;False;False)$
        ^!Set %hdr%=^$StrReplace(:;_;^%hdr%;False;False)$
        ^!Append %namList%=^%hdr%;
        ^!IfSame "^%cnt%" "10" premak
        ^!Inc %cnt%
        ^!Goto loop
        :fwd
        ; ^!If ^%cnt% < 9 lastpar
        ^!If ^%cnt% =< 9 lastpar

        :premak
        ^!SetArray %namList%=^%namList%
        ^!SetListDelimiter ^p
        ^!SetArray %RowAray%=^%rowlist%
        ^!Set %sorcidx%=^$GetDocIndex$
        ; ^!SetCursor ^%begin%:1
        ^!Set %index%=1; %fIdx%=0
        :makfil
        ^!SetCursor ^%RowAray^%index%%
        ^!Inc %index%
        ^!SelectTo ^%RowAray^%index%%
        ^!Set %ea_doc%=^$GetSelection$
        ^!Inc %fIdx%
        ^!TextToFile "^$GetDocumentPath$~tt^%namList^%fIdx%%.txt" ^%ea_doc%
        ^!IfError skip
        ^!Goto skip
        ^!TextToFile "^$GetDocumentPath$~t^%fIdx%~beep~.txt" ^%ea_doc%
        ; ^!Toolbar "New Document"
        ; ^!InsertText ^%ea_doc%
        ; ^!SetDocIndex ^%sorcidx%
        ^!If ^%index% >= ^%RowAray0% end
        ^!Goto makfil
        :lastpar
        ^!Jump TEXT_END
        ^!Set %row%=^$GetRow$; %col%=^$GetCol$
        ^!Append %rowlist%=^%row%:^%col%
        ^!Goto premak
        ;--<end of clip<<

        >My problem here is including the header (H=whatever).

        Ya, gotcha. Can opt to show headers but it doesn't include either the H=
        or the quotes.

        > The best I can
        >think of is to open the .clb and copy and paste the clip - which seems
        >a bit primitive.

        Or, briefly open the .clb long enuff to use find then select your desired
        area then getselection and use textofile then have the clip close the .clb


        > > synchronizer, right? probably better off with a file synchronizer
        >software. synchronizer was discussed recently on ntb off-topic list.
        >
        >I haven't looked into this, but I'd have thought it simple to
        >overwrite only if both the file dates and sizes are different. I
        >guess there's more to it.

        the more to it perhaps mostly (or at least partially) involves how much
        clip code needed to do all that much comparing, would also need many
        control structures and sub routines. Would probably need to get a bit
        intense with Ntab clip code to do the job (I didn't say it couldn't be
        done). Considering many freeware as well as relatively inexpensive file
        synchronizer/backup utilities available . . . But, NoteTab lets you do it
        your way, and lets me do it my way.

        Your zip clip ques, we can provide examples of command line but do need to
        know whether (your Pkzip) is a DOS software or a windows software (or a
        command line software for NT or Win 2K) -> I found that my Pkzip 250 for
        DOS *will not* work on Win NT or Win 2K) but works great on Win 9x

        Alan.
      • Alan C.
        Hi Mark, Everyone too: This clip makes ready at your finger tips the entire contents of one clip. No hassle of manually opening .clb etc. ... Also note that
        Message 3 of 8 , Oct 2, 2001
        • 0 Attachment
          Hi Mark,

          Everyone too: This clip makes ready at your finger tips the entire contents
          of one clip. No hassle of manually opening .clb etc.

          >My problem here is including the header (H=whatever). The best I can

          Also note that ^!SetClipboard is commented out so that it cannot be used
          because during my testing, tokens ^** got interpreted/evaluated.

          Be sure to read comments near top of clip.

          H="copy/save a single clip"
          ; Last edited:Tuesday, 02 October 2001
          ; AC ---------
          ; gets entire header and clip code content of one
          ; clip, and copies it into a new doc
          ; -----------
          ; this clip MUST BE launched from a clipbar button
          ; Also
          ; BEFORE you launch this clip you must
          ; right click a clip then choose
          ; headers to clipboard
          ; then click this clip's clipbar button
          ; then choose the desired clip
          ^!SetListDelimiter ^p
          ^!SetArray %clips%=^$GetClipboard$
          ; Ensure the NoteTab INI file is being used
          ^!SetIniFile
          ; Save the NoteTab settings
          ^!ProgIniSave
          ^!Set %clb%=^$GetValue("Clipbook:DefaultLibrary")$
          ^!Set %clips%=^$StrReplace("^%NL%";"|";"^%clips%";True;False)$
          ^!Set %clip%=^?{(H=28) choose 1==^%clips%}
          ^!SetScreenUpdate OFF
          ^!Open ^$GetLibraryPath$^%clb%.clb
          ^!Find "H="^%clip%" IWST
          ^!Jump LINE_END
          ^!Set %row1%=^$GetRow$:1
          ^!Find "^pH=" IST
          ^!Jump SELECT_START
          ^!Set %row2%=^$GetRow$:1
          ^!SetCursor ^%row1%
          ^!SelectTo ^%row2%
          ; ^!SetClipboard ^$GetSelection$
          ^!SetCode %output%=^$GetSelection$
          ; ^!SetClipboard ^%output%
          ^!Close
          ^!Toolbar "New Document"
          ^!InsertCode ^%output%
          ; -----<end of clip<<

          Regards. Alan.
        • Mark Halsall
          Hi Hrs, This does do something and almost works, but it always jumps back into Windows and presents the Save As box (the correct file is in fact zipped but not
          Message 4 of 8 , Oct 5, 2001
          • 0 Attachment
            Hi Hrs,

            This does do something and almost works, but it always jumps back into
            Windows and presents the Save As box (the correct file is in fact
            zipped but not saved). This happens either if I do it manually or
            with a clip such as:

            ^!Dos C:\pkzipw\pkzipw "C:\temp\test.zip" "C:\temp\test.txt"

            Mark


            > pkzipw <archive_name.zip> <list of files to compress, separated with
            spaces>

            > An example,
            > pkzipw test.zip file1.doc file2.doc
          • Mark Halsall
            Hi hrs, Thanks. I have a clumsy workaround - but it works: ^!Shell C: pkzipw pkzipw.exe C: temp test.zip C: temp test1.txt C: temp test2.txt ^!Delay 15 ;enter
            Message 5 of 8 , Oct 6, 2001
            • 0 Attachment
              Hi hrs,

              Thanks. I have a clumsy workaround - but it works:

              ^!Shell C:\pkzipw\pkzipw.exe C:\temp\test.zip C:\temp\test1.txt
              C:\temp\test2.txt
              ^!Delay 15
              ;enter into Save As dialog box
              ^!Keyboard #C:\temp\testx.zip# ENTER

              Funny thing is that C:\temp\test.zip is TOTALLY ignored.
              Also
              C:\temp\test1.txt is ignored if wrapped in double quotes
              and
              C:\temp\test2.txt is ignored if wrapped in double quotes.

              Very odd.

              I see Jody's Noteback clip uses
              ^!F:\Programs\WinZip\WinZip32.exe -min -a -en
              ^%ZipPath%^$StrLower("^$GetName(^##)$")$-otl.zip ^##

              So perhaps it would be simplest for me to get WinZip instead of PKZip.

              Regards,
              Mark


              > Hi Mark,
              >
              > Sorry for the delay in answering. I think you may have
              > better luck if you use the following command line;
              >
              > ^!Shell C:\pkzipw\pkzipw.exe "C:\temp\test.zip"
              > "C:\temp\test.txt"
              >
              > The command line in your message is at conflict. Pkzipw.exe
              > is a windows program yet, you are trying to run it in DOS.
              >
              > I tried this but it seems I must have some pkzipw options
              > set up wrong. Try looking in your Windows\temp folder for
              > any files you have experimented with. That's where pkzipw
              > put my experiments, after zipping.
              >
              > hrs
            Your message has been successfully submitted and would be delivered to recipients shortly.