Re: EAccessViolation
-snipped-
But I have another question. and I'll explain the scenerio... there is a remote directory that is populated with files that have the date stamped on the filename (format: filename_YYYYMMDD_timestamp, ex:test_20061102_115255) I would like to download all the files that are created for that particular day onto my local drive. if this can be done please provide an example.
ThX,
you need to generate ftp script dynamically through a program
language such as Perl,PHP, VBscript, etc...
since you can't predict the exact time stamp you'll need to
wildcard that part. Or you will need to rename or delete
the remote files after download so they don't match your pattern
the next time.
this is a portion of a euphoria program
that creates a macro to grab a file that includes
the day of the year value in it's name
(previously stored in GD_Julian variable).
this is only one possible mode, you
could use /command parameter but would have to deal
with double qoutes.
-- open new ftp macro file for write
-- '\n' is new line char '\\' is escaped backslash
integer df -- variable to hold the file#
df = open("testscp.get","w")
puts(df,"option batch abort\noption confirm off\n")
puts(df,"option echo off\noption transfer ascii\n")
puts(df,"cd /remotefolder\n LCD c:\\data\\\n")
puts(df,"get myfile_" & GD_Julian &"*.txt\n")
puts(df,"exit\n")
close(df)
-- call ftp client from Euphoria program
integer handle -- variable to hold the result from FTP
handle = system_exec(
"winscp405.exe /script=testscp.get "
& "/ini=c:\\tools\\bin\\winscp_normal.ini "
& "host"
,0)
-- ftp failed. Send result back to windows task scheduler
if handle then abort(1) end if