Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following situation: users update csv/txt files on daily basis on Windows. I use those flat files as input for my Oracle scripts which is on Unix. I need help on script/method of transferring those flat files from Windows to Unix.

My Unix shell scripting and Window batch coding is ok.

share|improve this question
What kind of access do you have on the Unix machine? Shell (SSH), FTP, anything else? – ddeimeke May 3 '12 at 11:53
Don't use ftp, it makes username/password travel the network in clear text. Scp is easiest to script alternative, sftp isn't too bad either. Check Bruce's answer. – jippie May 3 '12 at 18:09
WinSCP.exe is a useful tool, as well as using PuTTy.exe (like @BruceEdiger mentioned) – Kevdog777 Jun 10 at 9:49

You could use the SCP program that comes with famed terminal emulator PuTTY: pscp.exe

If you create public/private key files, pscp.exe should have the ability to just do something like:

pscp *.csv *.txt username@unixhost:whatever/subdirectory/

from inside a .bat file.

share|improve this answer
A cmd file would give him the extended syntax on windows. psftp is another option with putty. – Nils May 3 '12 at 20:28

You have several options available. Choose one that you are most comfortable with. One potential would be to set up an SMB/CIFS share on the Unix host.

In a script from each Windows workstation, mount the SMB/CIFS share with the net command.

net use \\computername\sharename /persistent:no

After completion of the copy or move of the file to the SMB/CIFS share, you could optionally remove the share from the Windows workstation.

net use \\computername\sharename /delete

You can get full options of the net command by running net help use. Here is a good unofficial guide to configuring Samba.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.