Knob,
Thanks for your help. I'm including the following code that I'm using. I was able to use what you suggested and upload a specific file. What I'm trying to do seems to be beyond my limited knowledge and programming experience though. Rather than upload a static file, I need to be able to upload any file found in a specific directory. So if there are 5 files in the directory, I need to be able to upload them 1 by 1 and then change the extention from ".zip" to ".bak" after the file has been successfully uploaded. So I'm thinking that I need some type of for -while loop where I loop for a specific number of times until there are no more files left in the directory. Do you have any sample code that does this, or could you tell me some of the commands or syntax that I need to use. Your help is greatly appreciated!
proc main
integer iStatus
string sUPLDPath ;Path to upload files from
string sDNLDPath ;Path to download file to
string sUPLDFile ;File to upload
string sDNLDFile ;File to download
string SUPLDPathFile
string sStatusSuccess
string SStatusFail
string sConnection ;Connection Directory entry to dial
sUPLDPath = "C:\Inetpub\ftproot\uploads\envoy\"
sDNLDPath = "C:\Inetpub\ftproot\downloads\envoy\"
sUPLDFile = "*.zip"
sDNLDFile = ""
sUPLDPathFile = "C:\Inetpub\ftproot\uploads\envoy\3103.zip"
sStatusSuccess = "Sucessful ZModem Transfer"
sStatusFail = "Failed ZModem Transfer"
sConnection = "Envoy-NEIC"
transmit "Z^M"
waitfor "^Begin file transfer procedure"
chdir sUPLDPath
sendfile ZMODEM sUPLDPathFile
usermsg "%s" sUPLDPathFile
iStatus = $XFERSTATUS
while iStatus == 1
yield
iStatus = $XFERSTATUS
endwhile
if iStatus == 2
;Transfer successful, Continue with script execution
usermsg "%s" sStatusSuccess
elseif iStatus == 3
;Transfer failed, perform error handling
usermsg "%s" sStatusFail
endif
waitfor "^Session Log (Y/N)"
transmit "N^M"
transmit "G^M"
endproc