zeroendless
Programmer
I have the client script to log in host(host script is one that comes with procomm plus). Then upload file to host if files on upload folder(client side) is current date. The folder could has more than 3 current date files.
Here's what i want to do. While uploading all current date files to host, i also need to download current date files from host ( could have more than 1 files). Is that a way to check files from host before downloading? The script provided is used to up/download only if the filename is know and no condition check on file date. The StartUpload module is used to call upload process.
any input is appreciated
----------------------------------------------------------
long Filedate
long lastDate
integer iStatus
string sFname
#define Step(a,b) transmit a # waitfor b
proc main
login()
if findfirst "C:\Program Files\Symantec\Procomm Plus\Upload\*.*"
sFname = $FILESPEC
Filedate = $FLTIME
lastDate = $LTIME - 86400
while findnext
if $FLTIME >= lastDate
Filedate = $FLTIME
sFname = $FILESPEC
StartUpload("u","z",sFname)
pause 5
endif
endwhile
endif
endproc
proc login
transmit "^M~~"
waitfor "Enter your FULL Name: "
transmit "test^M"
waitfor "Is this correct (Y/N)? "
transmit "y"
waitfor "Password: "
transmit "password^M"
endproc
proc StartDownload
param string Downchoice,Downprotocol,Downfilename
transmit "^M~~"
Step(Downchoice,"Your Choice? "
Step(Downprotocol,"Your choice? "
Step(Downfilename,"File name? "
transmit "^M~~"
getfile ZMODEM
iStatus = $XFERSTATUS
while iStatus==1
yield
iStatus = $XFERSTATUS
endwhile
endproc
proc StartUpload
param string Upchoice,Upprotocol,Upfilename
transmit "^M~~"
Step(Upchoice,"Your Choice? "
Step(Upprotocol,"Your choice? "
Step(Upfilename,"File name? "
transmit "^M~~"
sendfile ZMODEM Upfilename
iStatus = $XFERSTATUS
while iStatus == 1
iStatus = $XFERSTATUS
yield
endwhile
endproc
---------------------------------------------------
Here's what i want to do. While uploading all current date files to host, i also need to download current date files from host ( could have more than 1 files). Is that a way to check files from host before downloading? The script provided is used to up/download only if the filename is know and no condition check on file date. The StartUpload module is used to call upload process.
any input is appreciated
----------------------------------------------------------
long Filedate
long lastDate
integer iStatus
string sFname
#define Step(a,b) transmit a # waitfor b
proc main
login()
if findfirst "C:\Program Files\Symantec\Procomm Plus\Upload\*.*"
sFname = $FILESPEC
Filedate = $FLTIME
lastDate = $LTIME - 86400
while findnext
if $FLTIME >= lastDate
Filedate = $FLTIME
sFname = $FILESPEC
StartUpload("u","z",sFname)
pause 5
endif
endwhile
endif
endproc
proc login
transmit "^M~~"
waitfor "Enter your FULL Name: "
transmit "test^M"
waitfor "Is this correct (Y/N)? "
transmit "y"
waitfor "Password: "
transmit "password^M"
endproc
proc StartDownload
param string Downchoice,Downprotocol,Downfilename
transmit "^M~~"
Step(Downchoice,"Your Choice? "
Step(Downprotocol,"Your choice? "
Step(Downfilename,"File name? "
transmit "^M~~"
getfile ZMODEM
iStatus = $XFERSTATUS
while iStatus==1
yield
iStatus = $XFERSTATUS
endwhile
endproc
proc StartUpload
param string Upchoice,Upprotocol,Upfilename
transmit "^M~~"
Step(Upchoice,"Your Choice? "
Step(Upprotocol,"Your choice? "
Step(Upfilename,"File name? "
transmit "^M~~"
sendfile ZMODEM Upfilename
iStatus = $XFERSTATUS
while iStatus == 1
iStatus = $XFERSTATUS
yield
endwhile
endproc
---------------------------------------------------