• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help to Copy a File from Unix to Windows

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a script which basically capture the necessary lines from the stack of a source file and dump them into a destination file in the same Unix server. I want to add script in my existing script so that instead of same server I can dump the output into Windows server(like C:\) or somehow I can copy that file from Unix to Windows. I am new in Unix scripting. I would appreciate if someone can help me writing the script.

Here is my script:



 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To transfer a file from one computer to another - regardless of what OS's are involved, you need either a file-transfer program or a file server.

Popular file-transfer programs include FTP servers, HTTP servers, rcp, scp and rsync. Just for starters.

A file server can be set up using Windows File sharing on the Windows side or on the Linux side, you can use Samba or NFS (although NFS requires you to install an NFS client on the Windows machine).

Pick one and we can help you use it.
 
Sam Saha
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I want to use FTP. Please guide me how can I use ftp in my script to trasfer a file from Unix to Windows.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, you need to set up an FTP server in the Windows machine. Any version of Windows that contains IIS has an FTP server also available (this includes Windows Server and Professional).

Once that is set up, look at the man pages on your Linux box for the ftp command options for the command to place into your script.
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To transfer files between Unix and Windows you can install WinSCP tool which is a free tool. Once installed the files can be copied from and to Unix and Windows machine.

Regards,
Pradeep
http://www.unixonthego.com
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic