Solved

Best way to get files from Unix/Linux share to Windows Server (Programatically within .Net application)

Posted on 2009-04-07
4
652 Views
Last Modified: 2013-12-17
Hi all,
Thanks for looking this post. My question is:
What's the Best/Reliable/Easy way to get files from Unix/Linux share to Windows(Programatically within .Net application)? I need to create an application/service that runs continuously to watch for that unix/linux share and get files. Currently, I have a .net code that maps Unix/Linus share as a network drive on Windows Server with userid impersonation and gets files on Windows Server and then disconnect mapped share.  That works fine. But, it has overheads of mapping network drive at runtime and then disconnect after it's done.
Is there any better way to do this Programatically within .Net application?
0
Comment
Question by:chinawal
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:spprivate
spprivate earned 75 total points
ID: 24092770
another way to do is (what we did) was to use ftp.So set up the share as ftp and download from ftp.
Even couple of MSDN sites also suggest to use ftpwebrequest
0
 
LVL 5

Author Comment

by:chinawal
ID: 24097151
Thanks for advice. Unfortunately, the unix/linux box is out of my control. I may not be able to get it setup as FTP.
0
 
LVL 2

Accepted Solution

by:
raffraffraff earned 175 total points
ID: 24098726
I think what you're asking is "Does .NET have any built-in functionality for polling Unix boxes that don't have SAMBA running on them?" I doubt it, but I'm ready to be proven wrong. Microsoft released Windows Services For Unix for free, but I'm not sure if any of it is exposed through the .NET framework.

You could use SFU or GnuWin32 to speak natively to the Unix box, but you would have to run their .exe files the same way you'd use any DOS-like .exe file in .NET. It may be a little clunky, but essentially, armed with an ssh account on the Unix box, you could run an 'expect' script to list the remote directory contents and based on the results, you could run a second expect script to copy the files to the WIndows side.

If this sounds like it might work, let me know and I'll elaborate if I can. Otherwise, couldn't you just leave the Unix share mapped on the Windows box to avoid the overhead of mapping / disconnecting each time?
0
 
LVL 5

Author Comment

by:chinawal
ID: 24099387
I think, that share is a SAMABA share. I am not 100% sure. Since I am able to access it from Windows, doesn't it indicate that it has Samba and I read somewhere that it's a samba? (this server is out of my control).
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question