|
Answer» hello,
I have a script that transfer files from WINDOWS to Unix and I am not expert to batch FILE scripting, how can I create a file and logs in there if the data was sent or not? Also, this log file will regularly update as per activity/per day.
Thank you!Do you mean transfer it from one partion to another or do you mean by over a network?I transfer files from a Windows pc to a unix pc. through FTP by a batch file. I would like to add inside that script (batch file), an option that will log to a certain logfile if the transfer was successful or not.
Thanks!Can you show us your script? Then I can tell you how to generate the log.Sure, here it is.Thanks!
Batch file: @echo off f: cd \ cd PROGRAM files\winscp winscp.exe /console /script=c:\script\data.txt
data.txt option batch on option confirm off open (userid:[emailprotected]) ascii lcd c:\data\ (source data) DIR cd /data_files/Win2UX (TARGET path at unix) put *.res byeCode: [Select]@echo off cd /d "F:\program files\winscp" winscp.exe /console /script=c:\script\data.txt>C:\result.log Actually, we don't need use the tool winscp.exe to upload files to FTP server. We can use the windows built-in command ftp to do it.
|