I am using ScriptFTP to allow me to FTP a file to a server so that it can be used for our website. The file is an access database that the website code can use to look up case history for one of our clients. The file isn't terribly big (190 MB). My problem seems to happen in random intervols. Usually the file is uploaded to the server with no problems, but for the last 2 nights, after the putfile is exicuted, the file is not renamed to the original name and file extention. Only the .part file is there. I have tried to modify the script but I would like some feedback before I make it live.
FTP Script
- #configure the port and pass username and password
- #Change directory to Dataread\BTA and place BTAWebAccessDB.mdb there
- # sets the label/point ':check'
- :check
- #See if the file was correctly transfered by making sure a '.PART' file does not exist.
- #this will allow the putfile to start again if the .PART file DOES exist.
- GOTO :check
- #Go up two directories to root (\) and then change the directory to Datawrite\appbta.
- #put the file BTAWebAccessDB.mdb in the directory and change the name to
- #BTA_Decision_db.mdb
- :elsecheck
- #IF statement to check if the file was correctly transfered
- GOTO :elsecheck
FTP Script
- #configure the port and pass username and password
- #Maximum number of retries
- $MaxRetries=5
- #Change directory to Dataread\BTA and place BTAWebAccessDB.mdb there
- $Cnt=0
- $Result=""
- $Cnt=$Cnt+1
- #Go up two directories to root (\) and then change the directory to Datawrite\appbta.
- #put the file BTAWebAccessDB.mdb in the directory and change the name to
- #BTA_Decision_db.mdb
- $Cnt=0
- $Result=""
- $Cnt=$Cnt+1