Transfter files from linux to windows

Reply

Join Date: May 2008
Posts: 2
Reputation: born4unix is an unknown quantity at this point 
Solved Threads: 0
born4unix born4unix is offline Offline
Newbie Poster

Transfter files from linux to windows

 
0
  #1
May 27th, 2008
Hi,


I am new to this forum, I want to write a script which will transfer files from linux to windows,

on my Linux server ftp is disabled,
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 917
Reputation: linux is an unknown quantity at this point 
Solved Threads: 27
linux's Avatar
linux linux is offline Offline
Posting Shark

Re: Transfter files from linux to windows

 
0
  #2
May 27th, 2008
A script? Why not just use Samba?
Toshiba M1151.49 GB DDR-2 RAM1.6 GHz Centrino Duo80GB HDDWindows XP Media Center Edition
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 60
Reputation: BillBrown is an unknown quantity at this point 
Solved Threads: 1
BillBrown's Avatar
BillBrown BillBrown is offline Offline
Junior Poster in Training

Re: Transfter files from linux to windows

 
0
  #3
May 28th, 2008
Do you mean you want to transfer files from like hdb# (Linux /) to hdb# (/mnt/windows) or to a different machine entirely?
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 917
Reputation: linux is an unknown quantity at this point 
Solved Threads: 27
linux's Avatar
linux linux is offline Offline
Posting Shark

Re: Transfter files from linux to windows

 
0
  #4
May 28th, 2008
Well judging from his saying that his ftp server is disabled, I'd say two different machines.
Toshiba M1151.49 GB DDR-2 RAM1.6 GHz Centrino Duo80GB HDDWindows XP Media Center Edition
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 4
Reputation: icaruslnx is an unknown quantity at this point 
Solved Threads: 0
icaruslnx icaruslnx is offline Offline
Newbie Poster

Re: Transfter files from linux to windows

 
0
  #5
May 29th, 2008
I use scp which is a secure copy over SSH. First get SSH installed and running on the Linux machine.
On the Windows machine install WinSCP
once thats connected it's almost as simple as drag and drop to transfer files using a a nice split screen for files.

But a script would be a little more challenging...off hand I know of a way with FTP but then you'd have to set up the Windows machine as a FTP server. I think we need more details on what you are trying to do, like does the Windows machine have any open shares or anything that we can use?
Last edited by icaruslnx; May 29th, 2008 at 12:03 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 8
Reputation: hardwyrd is an unknown quantity at this point 
Solved Threads: 0
hardwyrd hardwyrd is offline Offline
Newbie Poster

Re: Transfter files from linux to windows

 
0
  #6
Jun 1st, 2008
Originally Posted by born4unix View Post
Hi,


I am new to this forum, I want to write a script which will transfer files from linux to windows,

on my Linux server ftp is disabled,

On your Linux machine create a script that will use smbclient to transfer your file which might look something like this:

======================= CAUTION : UNTESTED!!! =====================
I just wrote this on the fly...

====================== USE AT YOUR OWN RISK!!! ====================

#!/bin/bash
#
# cp2win
# Transfer a file to a windows machine using smbclient
# Script by hardwyrd (c) 2008
#
# Syntax:
# cp2win switch host-folder file remote-username remote-password
#
# Example:
# cp2win nologin \\\\myserver\myshare myfile.txt
# cp2win \\\\myserver\myshare myfile.txt myuser mypassword
#
# switch:
# nologin - turns on using login credential
#
# host-folder: must be in the format \\\\machine\folder

case $1 in
nologin )
smbclient $2 -c "put $3"
;;

* )
smbclient $1 -U $3%$4 -c "put $2"
;;

esac
Freelance Consultant
(Networking,Dev't,Linux,)
OpenSource Advocate/Evangelist
http://baudizm.blogsome.com
http://groups.google.com/group/Open-ITLUG
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the IT Professionals' Lounge Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC