Hi
I am transferring files from Windows XP to Linux machine using WinSCP through a Windows batch script. Once the transfer completes the batch code should get execute. But after the transfer it is not coming out of the WinSCP prompt at all. I try to give an extra
exit
in the batch code that will totally come out of the session. Seems like the
exit
in WinSCP command is not working properly. I am using same kind of code in another machine which Windows 7. What could be the issue? Below please find the code. I am using WinSCP 4.2.3 build 494.
WinSCP /command "option batch continue" "option confirm off" "open HPAY_UAT" "lcd D:\DSC_TRANS\FILES\" "cd /home/oracle/dsc_files/" "put 3.TIFF /home/oracle/dsc_files/" /log="D:\DSC_TRANS\LOGS\3.TIFF.log" "exit"
exit
findstr /C:"to remote directory finished" D:\DSC_TRANS\LOGS\3.TIFF.log
if %errorlevel%==0
(
echo update SHIYAS.EPSF_REMB_TIFF_STORE_PATH set STATUS_C= 'D' where STATUS_C= 'S' and Filename_C='3.TIFF'; >> D:\DSC_TRANS\UPDATE_TAB\update_test.sql
echo commit; >> D:\DSC_TRANS\UPDATE_TAB\update_test.sql
echo exit >> D:\DSC_TRANS\UPDATE_TAB\update_test.sql
echo sqlplus shiyas/shiyas123@UAT @D:\DSC_TRANS\UPDATE_TAB\update_test.sql > D:\DSC_TRANS\UPDATE_TAB\update_tab.bat
call D:\DSC_TRANS\UPDATE_TAB\update_tab.bat
)
exit
Below please find the output of running the batch script.
C:\Documents and Settings\a160559\Desktop>
C:\Documents and Settings\a160559\Desktop>Tran_3
C:\Documents and Settings\a160559\Desktop>WinSCP /command "option batch continue" "option confirm off" "open HPAY_UAT" "
lcd D:\DSC_TRANS\FILES\" "cd /home/oracle/dsc_files/" "put 3.TIFF /home/oracle/dsc_files/" /log="D:\DSC_TRANS\LOGS\3.TIF
F.log" "exit"
Searching for host...
Host does not exist
batch continue
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "oracle".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] HPAY_UAT
D:\DSC_TRANS\FILES
/home/oracle/dsc_files
3.TIFF | 0 KiB | 0.0 KiB/s | binary | 100%
winscp>
winscp>
winscp>
Above the control is not getting released from WinSCP prompt.
Please help me on this.
Thanks
SHIYAS M