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

Appending whole files

Expand Messages
  • Marcus
    How do you append a whole file? In DOS this would be copy file1+file2 file3 I tried the following in NTB, but I get an error ( Application not found, unkown
    Message 1 of 5 , May 31, 2001
      How do you append a whole file?
      In DOS this would be copy file1+file2 file3
      I tried the following in NTB, but I get an error ("Application not
      found, unkown command, or command line too long"):

      ^!CommandLine copy ^%tempclip%+^%ntb_lib%template2.txt ^%tempclip%

      Thanks for any help,

      Marcus
    • Alan C.
      Hi Marcus, ... I m guessing that it could be done by (either manually open in Ntab or using the clip language to) opening the file in Ntab. Next, use the clip
      Message 2 of 5 , May 31, 2001
        Hi Marcus,


        >How do you append a whole file?

        I'm guessing that it could be done by (either manually open in Ntab or using the clip language to) opening the file in Ntab. Next, use the clip language to select all then use the appendtofile getselection

        ^!AppendToFile ^$GetSelection$

        There may be a more efficient way.

        Alan.
      • Alan C.
        Oops that last one didn t stay in my hold bin it sent too soon Ntab should able command the dos to do what you want have you tried ^!dos yourstuffhere you need
        Message 3 of 5 , May 31, 2001
          Oops that last one didn't stay in my hold bin it sent too soon

          Ntab should able command the dos to do what you want

          have you tried

          ^!dos yourstuffhere

          you need full paths and use

          ^!dos ^$GetShort("c:\long\")$

          or

          ^!Set %short%=^$GetShort("c:\long\")$
          ^!dos ^%short%

          or

          may need use

          ^!ChDir todirwhere filetobecopied resides
          now other lines as above plus additional line (your line)
          ^!dos additional line (your dos copy line)

          Alan.
        • Marcus
          ... No, I hadn t, allthough I m using ^!dos elsewhere. Have you noticed that copy file1 + file2 file3 adds a character to the end of the file which throws
          Message 4 of 5 , Jun 1, 2001
            On 31.05.01 at 09:46 Alan C. wrote:
            >have you tried
            >
            >^!dos yourstuffhere

            No, I hadn't, allthough I'm using ^!dos elsewhere.

            Have you noticed that "copy file1 + file2 file3" adds a character to
            the end of the file which throws NTB off course? (DOS adds the
            character, not NTB)

            I tried specifying "/A" for ASCI in the "copy" command which
            surprisingly did not work, but "/B" for binary worked. I don't know
            why. Libraries are text documents aren't they?

            Marcus
          • Alan C.
            Hi Marcus, ... On 2nd thought, (I think based on what I know, my humble but limited knowledge) ^!dos is more to be used for launching a dos application, an
            Message 5 of 5 , Jun 1, 2001
              Hi Marcus,

              > >^!dos yourstuffhere
              >
              >No, I hadn't, allthough I'm using ^!dos elsewhere.

              On 2nd thought, (I think based on what I know, my humble but limited knowledge) ^!dos is more to be used for launching a dos application, an exe, not to initiate the copy command. But it did work.


              >Have you noticed that "copy file1 + file2 file3" adds a character to
              >the end of the file which throws NTB off course? (DOS adds the
              >character, not NTB)

              And, yes, when I tried it, I noticed something, a little square black character. But I did not try to use the file after I appended using the dos copy.


              >I tried specifying "/A" for ASCI in the "copy" command which
              >surprisingly did not work, but "/B" for binary worked. I don't know
              >why. Libraries are text documents aren't they?

              From what I know, .clb is just text.

              Ntab is the "power keyboard" for you also. Sort of like a player piano with a tape that makes the piano play. Sit back and watch them keys activate. But dos will still do what dos did. Note: W95, W98 uses command.com but need use cmd.exe if is 32 bit Windows OS, WINNT, Win 2k.

              ^!ChDir c:\temp\
              ^!IfAppOpen "C:\WINDOWS\command.com" skip
              ^!command.com
              ^!FocusApp "C:\WINDOWS\command.com"
              ^!Delay 3
              ^!Keyboard #copy test1.txt+test2.txt test3.txt# ENTER

              Maybe to open the file then select all then getselection then appendtofile using Ntab's clip language wasn't such a bad idea after all . . .

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