views:

1538

answers:

3

Is there any way a script can be made that copies files from a Unix drive onto a Windows drive?

+1  A: 

Yes, as long as the operating system the script is executing on can read from the Unix drive and write to the Windows drive. Since this is tagged vbscript, I'll assume you're running on Windows so you might want to look into something like this to get access to Unix filesystems for Windows (although that's a Linux ext driver). Then it's just running a standard copy function to complete your task.

Stuart Childs
+2  A: 

I do it manually all the time using secure copy (SCP). SCP comes already installed on most Unix machines. On my PC, I installed PuTTY which is a secure terminal app for Windows and also contains a secure copy utility.

When you do the secure copy manually from the Windows command line, you put your Unix username into the command line command, but then you have to type in your password at the prompt, so it's interactive. But I've also thought about doing it from a script or a batch file. In that case, you will need to create and install private and public keys on the appropriate machines. I created the appropriate keys and installed them on both the Windows and Unix machines and then I manually performed the Windows command line secure copy again and it did not ask me for my password that time. So this is one way you can accomplish your task. I'm sure there are many other ways, though.

Kurt W. Leucht
do I need putty for this?
CheeseConQueso
Yes. Although there are probably other products out there for Windows that provide a SCP utility. PuTTY is fairly popular, though. And free.
Kurt W. Leucht
+1  A: 

Since you have a Samba tag, are you talking about mounting a network share from a Unix machine onto your Windows machine?

If so, it is just treated like a normal network drive and you would be able to copy anything that you had permissions via the share.

crashmstr