views:

46

answers:

2

hi,

i have 2 csv files on my windows machine that i want to transfer to a unix server every hour (because the 2 files are updated every 30min).

so i search on the web and i found this possibility: to ftp the files from windows to unix using a batch and task scheduler.

i want to know if it's possible to do it from the unix server with a cron job or with java timer and not from the windows machine and if if there's other easier solutions.

thanks for your help

+1  A: 

The main problem you would have is in allowing the Unix machine to access a Windows file.

You didn't specify what kind of networking configuration you use and what version of Windows it is, as some later versions provide facilities for file sharing across platforms.

In the worst case, you could set up an FTP (or SFTP) server on your windows machine, share a specific directory in which you will put the file, and then write a script on the UNIX that will download the file from the windows machine. A variation on this is to install a web server on the windows machine, and have the script on the unix make an HTTP request for the file.

Uri
i'm on windows vista in intranet. could you please tell me how the script for the http solution should look like? oh and i also read about samba, does it fit me?
daria
If you serve the file on an HTTP server on Windows, you could simply use wget or curl to get the content periodically:wget http://ipaddress/yourfile
William
A: 

You could install a webserver like http://www.aprelium.com/abyssws/

It seems to be free and should be not that hard to set up. Afterwards put your files in the htdocs-folder and configure your Vista-firewall to let requests on port 80 pass.

Then you can access your files via

http://IPofYourWindowsComputer/yourfile.zip

If you want to access your windows machine from outside your local network you'd have to setup your router to forward port 80 to your windows machine. Otherwise the machine from outside will be blocked by the router.

PS: Samba (SMB) just works within the same LAN. If you are you could create a shared folder and put the files in there and access them via smbclient or mount.

PPS: Maybe your question is better placed @ http://serverfault.com

stefan
thanks for the link
daria