Hey I need to transfer a file from a windows box to LINUX using WINSCP in a .bat. The issue is `if there is a problem when automating the script the job will hang. There is an option batch abort fommand but is not working.
C:
cd \Program Files\winSCP
option batch abortset user=user
Set passwd=password
set pathL="/u02/prn/oradata/utl/eligxfer"
set pathW= \\ntserver1.restat.net\outbound\test\eligdrop700
echo running FTP now
winscp.com /console %user%:%passwd%@testbox /command "put %pathW%\*.srpt %pathL%/*.rpt" exit
But when I try using that I get the following message
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\Dbaservice>E:
E:\>cd E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>elig_ftptest.bat
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>C:
C:\Documents and Settings\Dbaservice>cd \Program Files\WinSCP
C:\Program Files\WinSCP>set user=FDCOFTP
C:\Program Files\WinSCP>Set passwd=FDCOFTP99
C:\Program Files\WinSCP>set path=":/u02/ant/oradata/utl/eligreport"
C:\Program Files\WinSCP>set path1=E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD
C:\Program Files\WinSCP>winscp.exe FDCOFTP:FDCOFTP99@qdbs1001 /command "put E
:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD\*.txt ":/u02/ant/oradata/utl/eligrepor
t"/*.txt" exit
C:\Program Files\WinSCP>ftp_elig_reports.bat
'ftp_elig_reports.bat' is not recognized as an internal or external command,
operable program or batch file.
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>C:
C:\Program Files\WinSCP>cd \Program Files\WinSCP
C:\Program Files\WinSCP>option batch abort
'option' is not recognized as an internal or external command,
operable program or batch file.
I have tried many variations like "option batch abort" option "batch abort" /option batch abort etc, any ideas?
Cretin
C:
cd \Program Files\winSCP
option batch abortset user=user
Set passwd=password
set pathL="/u02/prn/oradata/utl/eligxfer"
set pathW= \\ntserver1.restat.net\outbound\test\eligdrop700
echo running FTP now
winscp.com /console %user%:%passwd%@testbox /command "put %pathW%\*.srpt %pathL%/*.rpt" exit
But when I try using that I get the following message
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\Dbaservice>E:
E:\>cd E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>elig_ftptest.bat
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>C:
C:\Documents and Settings\Dbaservice>cd \Program Files\WinSCP
C:\Program Files\WinSCP>set user=FDCOFTP
C:\Program Files\WinSCP>Set passwd=FDCOFTP99
C:\Program Files\WinSCP>set path=":/u02/ant/oradata/utl/eligreport"
C:\Program Files\WinSCP>set path1=E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD
C:\Program Files\WinSCP>winscp.exe FDCOFTP:FDCOFTP99@qdbs1001 /command "put E
:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD\*.txt ":/u02/ant/oradata/utl/eligrepor
t"/*.txt" exit
C:\Program Files\WinSCP>ftp_elig_reports.bat
'ftp_elig_reports.bat' is not recognized as an internal or external command,
operable program or batch file.
E:\Operations\RESTAT_SCRIPTS\ELIG_TBA_LOAD>C:
C:\Program Files\WinSCP>cd \Program Files\WinSCP
C:\Program Files\WinSCP>option batch abort
'option' is not recognized as an internal or external command,
operable program or batch file.
I have tried many variations like "option batch abort" option "batch abort" /option batch abort etc, any ideas?
Cretin