Results 1 to 4 of 4

Thread: winscp + batch file

  1. #1
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    447
    Thanks
    10
    Thanked 46 Times in 43 Posts
    Rep Power
    6

    Default winscp + batch file

    Hi all,

    i want to copy data from linux box to windows server , i knew it , we can use winscp to copy file from linux to windows but i want this using scheduler( batch file)
    can somebody know how to create batch file for copy files from linux box to windows.

  2. #2
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    447
    Thanks
    10
    Thanked 46 Times in 43 Posts
    Rep Power
    6

    Default

    Hi all,
    i have created simple batch to achieve the same and its working....

    HTML Code:
    cd c:\Program Files\WinSCP\
    set user=test
    set passwd=typeherepass
    set LOG1="/path1"
    set LOG2="/path2"
    winscp.exe /console /command "option batch abort" "open %user%:%passwd%@192.168.250.16" "cd %LOG1%" "get filename1 d:\" "exit"
    winscp.exe /console /command "option batch abort" "open %user%:%passwd%@192.168.250.16" "cd %LOG2%" "get filename2 d:\" "exit"

  3. #3
    Senior Member
    Join Date
    Jun 2007
    Location
    Hyderabad, AP, India
    Posts
    805
    Thanks
    44
    Thanked 55 Times in 48 Posts
    Rep Power
    11

    Default

    i believe you require to copy from windows to Linux? is it?
    there is a default sheduling tool in windows..

    start->all programs->Accessaries->system tools-> shedule task

    there you can select winscp exe and do what ever you want.

    if you are looking for a Linux solution(copy from linux machine to windows), i suggest to write a script which use smb mounting at the time of copying and unmounting and keep it under crontab.
    Thanks,
    Surendra Kumar Anne
    Linux: Fast, friendly, flexible and .... free!
    Support Open source.
    http://www.linuxnix.com

  4. #4
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    447
    Thanks
    10
    Thanked 46 Times in 43 Posts
    Rep Power
    6

    Default

    Hi,
    thanks your reply , i was already solved my issue. using winscp command line option.
    and i think you have not read my query , was required "batch file".

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Shell scripting to batch file
    By libog35 in forum Shell scripting
    Replies: 1
    Last Post: 23rd November 2011, 11:52 PM
  2. ssh to remote server through windows batch file
    By p.b.jain in forum Shell scripting
    Replies: 0
    Last Post: 9th September 2011, 10:47 AM
  3. Batch rename of files
    By axslinger in forum Shell scripting
    Replies: 2
    Last Post: 27th October 2010, 11:00 PM
  4. batch cut first xx seconds of mp3 files
    By guzenkov in forum Linux software
    Replies: 0
    Last Post: 22nd May 2008, 09:52 PM
  5. how to creat new batch
    By cheecoo in forum Linux software
    Replies: 1
    Last Post: 20th November 2007, 08:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41