Register
It is currently Thu Oct 23, 2014 8:24 am

Copy files from Linux to Windows?


All times are UTC - 6 hours


Post new topic Reply to topic  [ 5 posts ] 
Author Message
 PostPosted: Tue May 15, 2007 4:10 am   

Joined: Tue May 15, 2007 3:27 am
Posts: 2
Hi

I'm in pain here.... sort of.

I need to create a script which can copy files/dirs from a Debian box to a Windows box. I'm not sure if rsync can be used in this setup?

The script should be able to:
-Copy files and directories to windows. (as is) .. not compressed. The filenames might have spaces, sry.
-Copy only changed or new files, on a regular basis (cron).
-Maintain the original timestamps.
-Maybe throw a log-file to windows.
-Not eat up all the resources on the Debian box, like cpu power etc.

I'm not interested in changing anything on the Debian box, because it's not mine, so a script would be perfect for this purpose.
I can change or modify the Windows box as I like. What is the best protocol to use here.. ftp, smb?

The current size of the files are 1.5GB and growing slowly.

The file structure which needs to be copied (eg):
/files
/files/pdf
/files/doc
/files/txt

etc.

I could really need an advice here, maybe a script which I can use/modify.

Thank you for your time, and for this forum.

/Flm

PS. I have just read a book about bash scripting.. but I will need to spend more time on this, I'm learning as I go on.


Top
 Profile  
 PostPosted: Tue May 15, 2007 5:25 am   

Joined: Tue May 15, 2007 3:27 am
Posts: 2
There has been some changes in the setup.

Actually what I need now, is a way to connect to a web api on the windows box, so I don't need to use FTP or similar.

Here is a small description of how to hook up to the webservice in C#:
------------------
One point with the Web API is that it can be accessed across platforms etc. Below small fragments how hook up to a web services in C#. Assume the name of your web server is MyWebSite, and that the web place ISEAPI contains files of the web service. Then you may think of MyWebSite.ISEAPI as a proxy for the web service. You may create a proxy object using the default constructor, and just access the API as if is implemented as a local object next to you. See below for some code fragments:
MyWebSite.ISEAPI MyService;
…
MyService = new MyWebSite.ISEAPI();
//Assigning DefaultCredentials to the Credentials property
//of the Web service client proxy (myProxy).
MyService.Credentials = System.Net.CredentialCache.DefaultCredentials;
…
MyService.AddDocument("uri", "title", "content", DateTime.Now, DateTime.Now, "test", null, null, "localhost", 8085);
------------------
Is that possible?

To sum it up.. The script should do as described in the prev. post, but connect to the API instead.

Right now I'm a little tired, my mind is on overload, but if someone can point me in the right direction I would be very very grateful.

thx.....


Top
 Profile  
 PostPosted: Tue May 15, 2007 10:39 am   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Hmmmmmm I'll watch this one with some interest, as I've never tried to work on a windows machine ..... should be interesting.

Sorry I'm not any help.
Welcome to bashscripts.org though. I'll PM a couple people about your post.


Top
 Profile WWW  
 PostPosted: Tue May 15, 2007 4:15 pm   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Hmm... I wouldn't even know where to begin with that web api, but then again I fear c# =P

Have you looked at Unison?


Top
 Profile YIM  
 PostPosted: Wed May 16, 2007 1:46 pm   

Joined: Thu May 10, 2007 10:16 am
Posts: 1
I have dealt with this type of setup before, but instead of a WEBapi, I opted for a CYGWIN/Bash interface on my Windows machines. This allowed for bash execution, and exchanging of SSH keys which allowed for RSYNC to work perfectly. I can assist with the setup, and if the CYGWIN solution does not suit you, you can opt for a UWIN solution. What these do is offer a *nix like environment on the windows box, while maintening the integrity.

Please let me know if you would like more information regarding a solution like this, and I am more than happy to help


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP