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?

   

Local Directory Polling Script Example

Please note that this script requires Beyond FTP Version 2.4.05 or above.

The following script polls a local directory for files to transfer. It does this by waiting at a file presence conditional for a specified time period. If any file activity occurs in the directory, the conditional  is released, the resulting files are copied, and the script terminates.

Download this script example.


# We first create the polling directory, if it is not already there.

:From: C:\BFTPDEMO\nmwin.BAT
:To: C:\BFTPDEMO\Polling\INPUT.BAT

# Next, use the file presence conditional to wait on files to appear
# in the Polling directory. Wait 5 minutes for something to happen.
# This time could be much longer if you choose, since the script will
# simply be restarted anyway.


:IF:  Not C:\BFTPDemo\Polling\*.Txt,5 Present

# We did not find any files. Simply queue the distribution to start
# again and exit. This statement could actually occur first in the
# script, since we always want the script to run. However, it makes
# canceling the script more difficult. We place it here (and below
# when the script works) to make it easier to cancel things once they
# get started.


    :Queue_Distribution: C:\BFTPDemo\LocalPolling.DCF

    :Stop: # on a failure we stop here
:End_If:

# The presence check is satisifed. Copy the files out to the
# destination server. The file is placed on APTServe, where the
# Remote Polling script will pick it up if it is running. Note that
# Archive is set. This means that as the source files are copied,
# they will be moved to c:\BFTPDemo\Polling\Archive.
# This prevents copying the same file twice. 

:Instructions:None
:Archive:Source
:Speed:OFF

:From: C:\BFTPDemo\Polling\*.Txt
:To: {APTServe}C:\Remote Demo\%LN\*.Txt

# Next, we check to see whether all the transfers have completed
# successfully. If they have, we delete the archive files. 
# Otherwise, we simply restart the distribution and exit.

:IF: PollingXfer CompletedOK

# We delete the archive files when the transfers have completed.
# We could also move them to a different directory, or simply leave
# them here. If a transfer fails, there will still be files in the polling
# directory. The next operation of the script will detect this, and
# immediately attempt another transfer.

    :Delete_Files: C:\BFTPDEMO\Polling\ARCHIVE\*.*
:
End_If:

 
# so we execute the Queue command no matter what
 # happens to the script


 :Queue_Distribution: C:\BFTPDemo\LocalPolling.DCF

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