Home
Product Feature Tour
  Beyond FTP
  Beyond Encryption
Features and Benefits
  Beyond FTP Server
  Beyond FTP Client
  Beyond Encryption
  Subscription Service
Product Screen Shots
  Beyond FTP
  Beyond Encryption
Lines of Business
  Government
  Education
  Banking
  Insurance
  Healthcare
Download
  Beyond FTP
  Beyond Encryption
  Current Release
Purchase
Support
Forums
Download White Papers
  Beyond FTP System Overview
  HIPAA Security
News
Customer Success Stories
  RewardsPlus of America
Upgrade Encryption
Give us Feedback
Register your Product
Search this Site
Company Profile
Contact Us
Awards
   

Su Doku Helper by Automated Programming Technologies, Inc.


FREE APT SuDoku Helper


Download the free APT SuDoku Helper to help solve SuDoku's or verify your solved SuDoku is correct.

What is a SuDoku?

   

Beyond FTP Feature Tour

Beyond FTP Script Editor - While/End_While Command

Back to Feature TourBack to Feature Tour Back

The While command implements loops in Beyond FTP scripts. There are three forms of this command. The first simply evaluates a conditional expression and stops when this expression is false.
The second form performs a file expansion and loops for each name in the expansion. The file name (without the path) is placed in the named variable on each pass. This variable is a string type, and is valid ONLY within the while loop. This allows the results of a single expansion to be used in multiple commands. The advantage of this approach is that only those files included in the expansion will be processed. New files arriving after the expansion will be processed the next time the script is run. The disadvantage is that each file is processed individually. There is no parallel processing for multiple files, which can increase the total run time for the script.

The third form reads sequentially through a text file and loops for each line in the file. Lines are terminated by carriage returns and line feeds. The entire contents of a line are placed in the named variable on each pass. There is a single special case. Lines that begin :Server: are assumed to be from a server list, and only the portion of the line following the :Server: command are returned. This allows you to easily parse a server list.

While commands may be nested. The Break command may be used to exit a while loop at any time. Break exits only the loop within which it occurs.


Example:

:While: ( %’Counter’ < 5 )
   :Assign:
Counter = %’Counter’ + 1
   :Log:
Iteration %’Counter’
:End_While:

:While:
LoopFile = Next {APTServe}c:\outbound\*.txt
    :From:
{APTServe}c:\outbound\%’LoopFile’
    :To:
c:\inbound\%’LoopFile’

    :if:
CompletedOK Transfer In
       :Delete_Files:
{APTServe}c:\outbound\%’LoopFile’
    :Else:
       :Log:
Transfer failed %’LoopFile’
       :Break:
    :End_If:
:End_While:

Back to Feature TourBack to Feature Tour Back

 

Sales:
Sales Toll free: 800-877-8765
International Sales: +01 810-225-0588
Send mail to with questions or comments about this web site.
Copyright © 1999-2007 Automated Programming Technologies, Inc.
Last modified: October 23, 2007