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

wsftp clip edited too much!

Expand Messages
  • Jonathan Woodbridge
    I have been chopping away at Jody s wsftp clips because I didn t need all the bells and whistles, and I also couldn t get the clip to run. I took out as many
    Message 1 of 4 , Dec 13, 2002
    • 0 Attachment
      I have been chopping away at Jody's wsftp clips because I didn't need
      all the bells and whistles, and I also couldn't get the clip to run. I
      took out as many variables as I didn't need and hard-coded whatever I
      could find. So I got the clip that uploads one file to work. But the
      clip that uploads multiple files still is foxing me.

      It opens a checkbox list of open documents, then reads them into a list
      into a text file and uses this file to run wsftp.

      My problem at the moment is that the variables %ServerPath% and %Mode%
      are going into the text file as literal text rather than as variables. I
      think it's a stray or missing " or $ in the following line that is doing
      it, but this array building is as yet beyond me.

      ^!Append %UploadFiles%=C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s
      local:"^$GetPath("^%UploadList^%Index%%")$^$GetFileName("^%UploadList^%I
      ndex%%")$" -d peacebrigades:^%ServerPath% ^%Mode%^%nl%


      Another possibility is that my editing of the setting of these variables
      is incorrect in:

      ^!Set %FileList%=^?{(T=A;H=20)Select documents to upload==^%FileList%};
      %Mode%=^?{Transfer in what file type mode=_Use ProfileName
      setting^=|ascii^=^%Space%-ascii|binary^=^%Space%-binary};
      %ServerPath%=^?{Enter server upload path=/}


      I'm trying to have ^ServerPath^ have a default of / but be editable.

      Can anyone figure this out?


      thanks,

      Jonathan





      ^!SetIniFile NtbUsers
      ^!SetHintInfo Working...
      ^!SetScreenUpdate Off

      ^!Set %n%=0
      ^!ClearVariable %FileList%
      ^!ClearVariable %UploadFiles%

      :Loop1
      ^!Inc %n%
      ^!If ^%n% > ^$GetDocCount$ Options
      ^!Set %FileName%=^$GetDocName(^%n%)$
      ^!IfSame "^%FileName%" "[Clips]" Loop1
      ^!IfFileExist "^%FileName%" Next else Loop1
      ^!Append %FileList%=_^%FileName%|
      ^!Goto Loop1

      :Options
      ^!SetListDelimiter ^p
      ^!Set %FileList%=^?{(T=A;H=20)Select documents to upload==^%FileList%};
      %Mode%=^?{Transfer in what file type mode=_Use ProfileName
      setting^=|ascii^=^%Space%-ascii|binary^=^%Space%-binary};
      %ServerPath%=^?{Enter server upload path=/}

      ^!SetArray %UploadList%=^%FileList%
      ^!Set %Count%=^%UploadList0%
      ^!Set %Index%=0

      :Loop2
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Skip_2
      ^!Append %UploadFiles%=C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s
      local:"^$GetPath("^%UploadList^%Index%%")$^$GetFileName("^%UploadList^%I
      ndex%%")$" -d peacebrigades:^%ServerPath% ^%Mode%^%nl%
      ^!Goto Loop2

      ^!TextToFile "C:\znet\WS_FTP Pro\TabXfer.txt" ^%UploadFiles%
      ^!C:\znet\WS_FTP Pro\ftp95pro -m C:\znet\WS_FTP Pro\TabXfer.txt
      ^!Wait
      ^!Info ^%Index% files uploaded
      ;^!StatusShow ^%Index% files uploaded!
      ;^!Delay 15
    • Sheri <silvermoonwoman@comcast.net>
      ... wrote: Hi Jonathan, Can you give an example of what you want in the file vs what is going there? I ran your clip (minus the actual
      Message 2 of 4 , Dec 14, 2002
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "Jonathan Woodbridge"
        <woodbridge@a...> wrote:

        Hi Jonathan,

        Can you give an example of what you want in the file vs what is going
        there?

        I ran your clip (minus the actual program running) and it seemed to
        work fine. Did you want it to prompt separately for each file's
        server path and mode? One thing I noticed is you need to put

        ^!Dec %Index%

        before displaying the file count.

        Also, it is helpful to use this statement while debugging your clips,
        then remove it once you see what is going wrong.

        ^!Setdebug on

        Regards,
        Sheri
      • Alan C.
        Hi Jonathan, ... C: znet WS_FTP Pro ftp95pro -p peacebrigades -s local: D: files ntbdocs wthr_regex.txt -d peacebrigades:/ C: znet WS_FTP Pro ftp95pro -p
        Message 3 of 4 , Dec 14, 2002
        • 0 Attachment
          Hi Jonathan,

          >My problem at the moment is that the variables %ServerPath% and %Mode%
          >are going into the text file as literal text rather than as variables.

          C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s local:"D:\files\ntbdocs\wthr_regex.txt" -d peacebrigades:/
          C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s local:"D:\files\infile.txt" -d peacebrigades:/
          C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s local:"D:\files\infile3.txt" -d peacebrigades:/

          Not so on this end (at least from what I see unless/until you provide as per Sheri's request), at least not yet anyway. I also tried it with ascii as the option and the ascii ended up in the TabXfer file.

          Before I could run your clip, I had to remove some line breaks in a couple long lines. And while engaged in same, I noticed the need to also re introduce a missing space.

          Like Sheri, I put a ^!goto end just after the TabXfer file creation.

          --
          Alan.
        • Jody
          Hi Jonathan, ... Me neither I found out. ... It depends on whether you are using Pro or LE as far as what is happening, if I remember correctly. ;) ... I
          Message 4 of 4 , Dec 16, 2002
          • 0 Attachment
            Hi Jonathan,

            >I have been chopping away at Jody's wsftp clips because I didn't need
            >all the bells and whistles

            Me neither I found out. <g>

            >and I also couldn't get the clip to run. I took out as many
            >variables as I didn't need and hard-coded whatever I could find.
            >So I got the clip that uploads one file to work. But the clip
            >that uploads multiple files still is foxing me.

            It depends on whether you are using Pro or LE as far as what is
            happening, if I remember correctly. ;)

            >I'm trying to have ^ServerPath^ have a default of / but be editable.

            >^!Append %UploadFiles%=C:\znet\WS_FTP Pro\ftp95pro -p peacebrigades -s
            >local:"^$GetPath("^%UploadList^%Index%%")$^$GetFileName("^%UploadList^%I
            >ndex%%")$" -d peacebrigades:^%ServerPath% ^%Mode%^%nl%

            I use one clickers for the most part. Try changing your forward
            slash (/) to a backslash (\). I don't know if that is server or
            ws_ftp (version) that causes it. I know I now presently use the
            backslashes with a couple different servers. I remember at one
            time I used /.

            Please write me in private eMail or the Off-Topic list since this
            doesn't really deal with NoteTab. TIA

            Happy Topics,
            Jody

            The NoteTab Off-Topic List
            mailto:ntb-OffTopic-Subscribe@yahoogroups.com
            mailto:ntb-OffTopic-UnSubscribe@yahoogroups.com
          Your message has been successfully submitted and would be delivered to recipients shortly.