On Window$ systems, there is, by default, a hidden share per drive on each computer. You can access this share if you know it's name, and have admin priviledges.
Typically, this share is
\\COMPUTERNAME\C$
You can use this to copy files either via perl (any programming language), or BAT file, or via the GUI in Explorer.
"For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken
| [reply] [d/l] |
Wow I didn't know that. Just tried it and it does work. Shouldn't this be considered a security risk or something?
| [reply] |
| [reply] |
"Share" sounds like a Windows box, but even if it isn't this applies: When you say, "...need a scipt that will either copy files ... to a remote computer that does not have a share..." the obvious question I have to ask is, "why don't you just add a share?" Should you have a share on the other box?
Celebrate Intellectual Diversity
| [reply] |
Depending upon the systems and the files involved, you could try just mailing them between two users, or even scp'ing them (if unix, windows also has a winscp program one can download).
Failing that, you could write a client/server script that opens up a socket. Then read bytes from the file in question on the server and write them out the socket. On the client side, read from the socket and write to the new file. Primitive but effective.
| [reply] |
Does this computer of yours have an OS (operating system)? Care to share what that might be? | [reply] |
I've had to write several scripts that move files between various Unix and Windows platforms. I've used SmbClientParser to good effect for this. Since I don't have admin rights on the Windows boxes, I run everything from the Unix boxen from crontab - including one script that copies a large database file from one Windows box to another.
Hope this helps,
Jack | [reply] |