Unix/Linux Go Back    


Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

Cygwin script to transfer file from windows to UNIX

Windows & DOS: Issues & Discussions


Tags
cygwin, script

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-15-2014
wahi80 wahi80 is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 18 October 2016, 1:56 PM EDT
Posts: 35
Thanks: 17
Thanked 1 Time in 1 Post
Cygwin script to transfer file from windows to UNIX

Hi,
Objective is to transfer files from windows server to Unix server using cygwin.
I have installed cygwin, and I manually execute commands and transfer files from windows to unix using sftp. These are steps I execute
1) Run cmd
2) Run cygwin
3) At prompt type sftp user1@uniserver
4) lcd "C:\Work"
5) cd /data/in
6) mput *.dat
7) bye

I have following questions:
I need to automate the above process and script needs to exist on Windows server.
If I need to pass parameters will it be in shell script format or windows?
How will I invoke cygwin and execute the script at command line?
Sponsored Links
    #2  
Old Unix and Linux 12-15-2014
fpmurphy's Unix or Linux Image
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 12 June 2016, 11:03 PM EDT
Location: /dev/ph
Posts: 4,996
Thanks: 73
Thanked 475 Times in 437 Posts
It might be simpler to simply install Putty on your Windows Server and use a batch file with psftp to transfer your files.
Sponsored Links
    #3  
Old Unix and Linux 12-16-2014
wahi80 wahi80 is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 18 October 2016, 1:56 PM EDT
Posts: 35
Thanks: 17
Thanked 1 Time in 1 Post
Hi
cygwin is the only approved tool
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
UNIX to windows XP file transfer senthil17 UNIX and Linux Applications 4 11-29-2012 04:22 PM
Shell Script to transfer files from unix to windows vsachan Shell Programming and Scripting 1 10-24-2011 06:01 AM
file transfer from windows to unix using ftp Nandagopal Shell Programming and Scripting 5 05-27-2009 08:04 AM
transfer file from unix to windows on same PC monika UNIX for Dummies Questions & Answers 4 05-28-2008 07:35 AM
shell script to transfer files from Unix to Windows knag Shell Programming and Scripting 15 12-05-2006 05:46 PM



All times are GMT -4. The time now is 11:47 PM.