Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

mjraley

Re: EAccessViolation

matatan wrote:


-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
martin

Re: EAccessViolation

matatan wrote:

the latest version does not allow for wildcard transmission; meaning I can't download a group of files from one directory who's extention is xls.

It is not true. Why do you think so?

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.

You will need to dynamically modify your script. You may use the very same techniques as shown in this example.
matatan

Re: EAccessViolation

martin wrote:

Matatan wrote:

could you please provide the link to download 3.7.6?

You should better download the latest version, 3.8.2.


the latest version does not allow for wildcard transmission; meaning I can't download a group of files from one directory who's extention is xls. I've downloaded the 3.7.6 version and got my script to work.

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,
martin

Re: EAccessViolation

Matatan wrote:

could you please provide the link to download 3.7.6?

You should better download the latest version, 3.8.2.
Matatan

Re: EAccessViolation

martin wrote:

If you are using 3.8 beta, please downgrade to 3.7.6.


could you please provide the link to download 3.7.6?

ThX.
martin

Re: EAccessViolation

If you are using 3.8 beta, please downgrade to 3.7.6.
Guest

EAccessViolation

Hi,
I'm trying to write a small script like it connects the linux box and get the log from a /var/log to windows.

my script is (copyLog.scp)

# Getting the log
option batch on
# Disable overwrite confirmations that conflict
option confirm off
# Connect
open root@10.11.17.227
# Change remote directory
cd /var/log/
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get host.log c:\
# Disconnect
close
# Exit WinSCP
exit

I'm running it as
C:\WinSCP3>WinSCP3.com /script=copyLog.scp

I'm getting the error as

batch on
confirm off
EAccessViolation
No session.
transfer binary
No session.
No session.

I think by this the connection itself is not happened, Please share the ideas how to get out of that EAccessViolation

Thanks,
martin

Re: example not word

F-OFF wrote:

The problem is....is that you seem to be a dick.

That explains everything.
F-OFF

Re: example not word

The problem is....is that you seem to be a dick.
martin

Re: example not word

I still do not understand. I do not see any problem with your script. It probably does what you want to do. So what do you want me to help you with? :-)
Is your problem that you do not know, how to pass a password to the script?

Edit: Please read FAQ on scheduling.
rose

example not word

Schedule
upload.bat:
**************************
:: upload.bat
::
:: Daily upload
::
::
@ECHO ON
schtasks /create /tn "Upload" /tr "C:\WinSCP3\winscp3.com /script=C:\Batch\upload.scp" /sc daily /mo 1 /st 11:15 /ru rose /rp rose
ECHO

***************************
utomatic upload to server
upload.scp

# Automatically answer all prompts negativelly not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Connect
open rose@98.168.0.100
# Change remote directory
cd /home/rose
# Upload file to current working directory
put C:\test.txt
# Disconnect
close
# Exit WinSCP
#exit

**************************

if admin have different way plase tell me
thank
rose

i read exemple:
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Connect
open user@example.com
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to local directory d:\
get examplefile.txt d:\
# Disconnect
close
exit
but server using password?
and Schedule a tranfer
"
Window machine - Data store: file "daiyly20050810.dat"
daiyly 2005 08 10 Window machine automatic upload file -> Server.
"
thank
rose

exemple

:idea: Window machine - Data store: file "daiyly20050810.dat"
daiyly 2005 08 10 Window machine automatic upload file -> Server.
thank
martin

Re: help me Example

rose wrote:

:wink: Hello admin !
plase give me some Example "Schedule a tranfer" with PHP
thank you very much

How can I give you an example, when I do not give me any hint as to what you want to do?
rose

help me Example

:wink: Hello admin !
plase give me some Example "Schedule a tranfer" with PHP
thank you very much
martin

Re: Schedule a tranfer

You will need to wrap call to WinSCP into some script (Perl, PHP, ...) that will generate the name of the file.
kccja

Schedule a tranfer

Is it possible to Schedule one file transfert each days at the same time (the file name depend of the date of the Day ?

Example: to day we are The 07-08-2005 and i like to get the following file WFR2yyyymmddDE1 at 12 o clock.
yyyymmdd is date of the day.

Tancks for your Help ! :roll: