Visit Our UNIX and Linux User Community


Problem copying files from windows to unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem copying files from windows to unix
# 1  
Old 03-06-2012
Problem copying files from windows to unix

Hello,

I want some directions for a command inside a shell script which would copy files from some path on my windows os (say my documents) to the path where my shell script is saved and I want it to exit the sftp session and continue executing the remaining lines in my shell script after copying.

I am able to connect to other servers using
Sftp $hostname $username and I can specify my files to be copied inside <<eof but that allowsme to copy files from $username $hostname to the current user from which I execute the script but now I want to copy files from some path on my windows os like my documents for instance.

Please help.
# 2  
Old 03-06-2012
If you want to run ftp or sftp on windows, you'll have to start daemons for them, it won't just happen to have them running.

Same for file shares. You must actually open up file shares to have file shares open.

How to access these shares from UNIX depends on your OS.
# 3  
Old 03-06-2012
It does happen

Thanks corona for replying. I use secure CRT for my shells. If im not wrong, there is an option of connecting every tab thro sftp when v choose alt+p from our shell or right click on our shell tab and choose connect in sftp tab from the options.

It opens an sftp session with my documents as my local pwd and the home path of the user for which I connect in sftp tab as the remote pwd and I can use get and put commands to transfer files either way. That does work, but my problem now is that I invoke the sftp command manually to some server which makes the user from which I invoke the sftp command as my loped and the user to which I take the sftp command as my rpwdor vice versa.

Now I want to trap the command to create an sftp connection btw windows and my current shell user which is invoked when I use alt+p.

Thanks in advance

Previous Thread | Next Thread
Test Your Knowledge in Computers #225
Difficulty: Easy
In September 2019, according to NetMarketShare, Google commanded over 90% market share for desktop search engines.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in... (4 Replies)
Discussion started by: gvkumar25
4 Replies

2. UNIX for Dummies Questions & Answers

Script for copying files from windows to UNIX

Hi guys Let me start by saying that I'm a newbie, so feel free to point me to any good reading material. What I wanted to do is copy some specific files from windows to unix. Let me elaborate my view. Let's say I have some directory tree in unix, CHO-species/C2H1O1/ VAS-S005-001-Ru444/OPT-0/,... (16 Replies)
Discussion started by: saleheen
16 Replies

3. Shell Programming and Scripting

Copying files from windows shared location to linux box

Hi, i am new to shell scripting. i have a requirement to copy the files from a windows shared location( vendor will place the files here) to Linux server( my Informatica will pick the files from this location). Files should be loaded in the order in which they were placed in windows box.(Based on... (1 Reply)
Discussion started by: Haari
1 Replies

4. Shell Programming and Scripting

RCP for copying the files from one drive to other on Windows

Hi, I have a requirement to move the files between two drives in windows machine from Korn sheel. I came to know that It can be done through RCP. Can any one help me with syntax for connecting to Windows machine and moving the files with RCP in KSH? Thanks in advance. Double post.... (0 Replies)
Discussion started by: Raamc
0 Replies

5. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

6. UNIX for Dummies Questions & Answers

copying files from Windows!!

All, I have a requirement where Iwill be getting the CSV files on windows Shared Drive, and I need to copy those to my unix directory... Is there anyway we can do this?? Thanks, freakabhi (4 Replies)
Discussion started by: freakabhi
4 Replies

7. Shell Programming and Scripting

copying files from UNIX to windows using FTP

Hi, I want to transfer the approx 10k files available on UNIX Server to Windows Server using FTP Command. is it possible? how ? Thanks in advance. Sachin. (1 Reply)
Discussion started by: ssachins
1 Replies

8. Shell Programming and Scripting

copying from unix to windows

Hi, I am new to shell scripting, I want to copy some imp files from solaris server to windows server in a particular directory,username and password should be inside script and i want to it should copy output of some commands to windows server.first it will copy output of command to file then... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

9. Filesystems, Disks and Memory

Unix Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!!

Hello Moto I hope someone can help We's here at work, have a unix box with sco openserver 5 on it, so it has a nice gui interface.. and also a fair few windows computers.. a system admin guy b4 me, has set up a user called neil, which can, when u try to access the unix box using windows... (2 Replies)
Discussion started by: haggo
2 Replies

10. UNIX for Dummies Questions & Answers

Copying file from Unix workspace to Windows Network

Hi All, I am new for Unix, and facing one problem I wanted to copy some of files from my Unix workarea to Window network drive. I am not able to use copy or move command for this, as this only works within workarea. Please let me know, how it can be done. (2 Replies)
Discussion started by: ashwanis
2 Replies

Featured Tech Videos