Results 1 to 5 of 5
Hi all,
I want to transfer data/file from linux machine to windows machine using scripting programing. how can i write script using commands.kindly help in this aspect.
Thanks in advance,
...
- 07-22-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
How to transfer a file from linux system to window system using script
Hi all,
I want to transfer data/file from linux machine to windows machine using scripting programing. how can i write script using commands.kindly help in this aspect.
Thanks in advance,
Kishor gupta.
- 07-23-2009 #2
The first step will to be set up the Windows machine to run an ssh server. I don't know the details of doing this, as I don't run Windows, but you will need this first step.
Once you have done this, you can use the command scp to copy files via SSH between two computers. It works similarly to the normal cp command:
I don't know how this works with a Windows machine, but I'm sure that someone has done this before, and has explained it online.Code:scp localuser@localmachine:/path/to/local/file remoteuser@remotemachine:/path/to/remote/file
Good luck.DISTRO=Arch
Registered Linux User #388732
- 07-23-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
thanks for Reply.
this command surely works if both machines r linux.R u sure scp will work for windows machines also.Let me know is it works or not.
Regards,
Kishor
- 07-23-2009 #4Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Another approach, which is one that I use, is to install a free version of ssh on the Windows PC, and then pull the files from the Linux system to the Windows system. The free version I use is 'putty' and the command would look something like this:
I assume you could write a DOS script to do this but I don't know DOS scripting. I do know that you'll have to set up public/private keys so a password won't be needed. That would be done with puttygen.Code:drive:\path\to\pscp remoteuser@remotehost:/path/to/files drive:\path\to\dest\
- 07-23-2009 #5
Another way is to just create a samba share, but you could also use ftp. It depends on how you want it. scp is probably the safest way to do it over the internet. I dunno if you can make a sshfs share between Linux and Windows, but my guess is you can.
Can't tell an OS by it's GUI


Reply With Quote