Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is it possible to move a file from UNIX to windows?

Status
Not open for further replies.

oark

Programmer
Jul 8, 2004
2
US
I'm writing a CGI that takes a user upload file, manipulates it, and then emails the result to the user.

Is it possible to copy a file in a UNIX directory to a directory on a Windows machine? I work from a windows machine and use an X Server program to login to the UNIX server, which contains all the Perl libraries, etc.

I'm wondering if I can just store the file on a shared drive instead of emailing it to the user.

Or, instead, is there a way to automatically download a file onto a user's machine?

Thanks for any input,
oark
 
I believe (can't remember for sure...) that you can use SAMBA to accomplish this (I'm pretty sure that was the package)

[cheers]
Cheers!
Laura
 
oark,
What sort of file? What kind of probelms are you having?
--Paul

SAMBA, if I remember correctly, is a file share protocol to mount a network drive between operating systems, and is part of the *nix ditributions, though I could be wrong, have been in the past, and the future is looking pretty bleak as well

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
It's a standard text file. My problem is simply that I don't know how to approach storing the file onto a windows drive, since my CGI runs from a UNIX system.

I don't have admin permissions, and the server I code on does not have SAMBA installed, so this doesn't look like a viable approach.
 
Samba is the way to go, as the others have said. On your unix machine look at the man pages for smbclient or smbmount. Of course to do this you'll need to set up shared folders on each windows machine you're going to need access to.

 
I email text files from *nix to Doze pretty regularly, and haven't had any problems because when the client saves them to disk it handles the differences pretty sweetly.

The main differences is \r\n on windows (i think) and \n on *nix

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Another option is FTP, but again you'll need an FTP server installed on each windows machine.

Or can't your cgi program just output the text file to the user's web browser? Then they can just save it to their machine from there.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top