Results 1 to 6 of 6

Thread: Copy file from UNIX to Windows XP

  1. #1
    Member
    Join Date
    Apr 2012
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Copy file from UNIX to Windows XP

    Hi,
    I'm new to UNIX,
    i just want to understand the process of copy a file from UNIX to windows XP,
    need a help please can i have a explanation with example shell script.

    Thanks & Regards,
    Inshaf

  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    use win scp or file Zilla .. these are open softwares.. JUst download the .exe of any of the above and install in windows Xp.. u will come to know the solution...
    Last edited by brahma; 20th April 2012 at 03:50 PM.

  3. #3
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 804 Times in 511 Posts
    Rep Power
    10

    Default

    You just can't copy files from Unix or Linux to Windows system. First, turn on file sharing on Windows XP and create a shared folder. Use smbclient command which is ftp-like client to access SMB/CIFS/Windows xp shared resources from Unix command line. It can download or upload files to Windows XP share.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  4. #4
    Member
    Join Date
    Apr 2012
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hey thanks a lot,

    could you please tel me how can we give a out put path to a shell script?

    Inshaf

  5. #5
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    485
    Thanks
    10
    Thanked 49 Times in 46 Posts
    Rep Power
    8

    Default

    Hi,
    Following script is working in ubuntu
    HTML Code:
    #!/bin/bash
    # Author  : Rahul Patil
    # Date    : Tue Apr  3 15:30:00 IST 2012
    # Purpose : Copy logs to windows share (Ubuntu)
    
    # Variables
    WIN_PC_IP="192.168.0.13/sharename"   ## IP address with sharename
    WIN_USER="rahul"
    WIN_PASSWORD="password"
    RSYNC=$(which rsync)
    
    # Path of Windows share
    DESTPATH="/windows-share"
    
    # Path of Linux file which will be copy to win share
    SOURCEPATH="/opt/test/"
    
    LOGFILE="/var/log/copy.log"    
    
    # check samba installed or not if not then install
    if [ ! -x /usr/bin/smbclient ]; then
    echo "smb-client package not installed"
    echo "installing smb-client packge.."
    aptitude install samba-client -y
    fi
    
    # check mount
    if [ ! -d $DESTPATH ]; then
    mkdir $DESTPATH
    fi
    
    # check winshre mounted or not
    mount | grep "$WIN_PC_IP" 1>/dev/null
    STATUS=$?
    if [ $STATUS -eq 0 ]; then
    echo "Windowsshare OK"
    else
    mount -o username=$WIN_USER,password=$WIN_PASSWORD -t cifs //$WIN_PC_IP $DESTPATH
    fi
    
    # check 1
    if [ ! -d $DESTPATH ]; then
    echo "Creating $DESTPATH"
    mkdir $DESTPATH
    fi
    
    # Copy files to win share
    
    echo $'\n\n' >> $LOGFILE
    $RSYNC -av $SOURCEPATH $DESTPATH 2>&1 >> $LOGFILE
    echo 'Completed at: ` date +%d-%b-%y-%T`' >> $LOGFILE 
    

  6. #6
    Member
    Join Date
    Apr 2012
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Thanks friend ,,,
    this helps me a lot

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need script to copy ear file from windows XP to linux server
    By singulurib in forum Shell scripting
    Replies: 1
    Last Post: 9th January 2012, 07:40 PM
  2. [Solved] Linux / UNIX copy single file in to two files
    By kumarat9pm in forum CentOS / RHEL / Fedora
    Replies: 4
    Last Post: 30th April 2010, 12:11 PM
  3. [Solved] HowTo: Contert Windows .Bat File To UNIX/Linux Shell Script
    By vamsi in forum Shell scripting
    Replies: 7
    Last Post: 29th December 2009, 02:59 PM
  4. [Solved] How to copy fonts file in UNIX / Linux?
    By tonjaa in forum Ubuntu / Debian
    Replies: 2
    Last Post: 12th July 2009, 06:14 PM
  5. Find Unix Linux File / Directory by date And Then Copy / Move File
    By asim.mcp in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 10th August 2008, 03:30 AM

Tags for this Thread

Posting Permissions

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