Volkmaniac
Technical User
I've come across a problem using ProComm's ftp.
I have to grab a file every morning and they have a flag instituted to tell me which file to grab. The flag precedes the file name. I can see the flag when I open Wintelnet but I can only see the filename when I use ProComm.
Wintelnet:
-AR------TCP B mailbox 4095 112905 Sep 11 21:24 RFIIAR2I.ZIP
ProComm
RFIIAR2I.ZIP
I realized I couldn't use "-AR-" as the remote file filter so I tried using the following code to try and grab the latest file. That didn't work either. It kept coming up with NO BATCHES TO SEND. Has anyone ever encountered this before?
#define SearchString "*.ZIP" ;Path to file spec
proc GetNewest
long Newest ;Maintain date/time for newest file found
fname = "[ None ]" ;Default to [ None ] for name
if findfirst SearchString ;Find the first file
Newest = $FLTIME ;Get the first file's date/time info
fname = $FILENAME ;Get the first file's name
while findnext ;Find the next file
if $FLTIME >= Newest ;Is this ones date/time newer?
Newest = $FLTIME ;Get the new file's date/time info
fname = $FILENAME ;Get the new file's file name
endif
endwhile
endif
endproc
I have to grab a file every morning and they have a flag instituted to tell me which file to grab. The flag precedes the file name. I can see the flag when I open Wintelnet but I can only see the filename when I use ProComm.
Wintelnet:
-AR------TCP B mailbox 4095 112905 Sep 11 21:24 RFIIAR2I.ZIP
ProComm
RFIIAR2I.ZIP
I realized I couldn't use "-AR-" as the remote file filter so I tried using the following code to try and grab the latest file. That didn't work either. It kept coming up with NO BATCHES TO SEND. Has anyone ever encountered this before?
#define SearchString "*.ZIP" ;Path to file spec
proc GetNewest
long Newest ;Maintain date/time for newest file found
fname = "[ None ]" ;Default to [ None ] for name
if findfirst SearchString ;Find the first file
Newest = $FLTIME ;Get the first file's date/time info
fname = $FILENAME ;Get the first file's name
while findnext ;Find the next file
if $FLTIME >= Newest ;Is this ones date/time newer?
Newest = $FLTIME ;Get the new file's date/time info
fname = $FILENAME ;Get the new file's file name
endif
endwhile
endif
endproc