Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Copy files between computers
by NetWallah (Canon) on Feb 10, 2006 at 01:07 UTC
    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

      Wow I didn't know that. Just tried it and it does work. Shouldn't this be considered a security risk or something?
        it is a security concern, because it creates a share for each drive, without telling the user, and requires a registry edit to disable.

        you do need to have a username/pw with admin priveledges to access said shares though, which is prolly why ms never bothered to change it. they probably figured "its secure enough"

        __________
        Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
        - Terry Pratchett

Re: Copy files between computers
by InfiniteSilence (Curate) on Feb 09, 2006 at 21:11 UTC
    "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

Re: Copy files between computers
by wulvrine (Friar) on Feb 09, 2006 at 23:00 UTC
    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.

Re: Copy files between computers
by SamCG (Hermit) on Feb 09, 2006 at 20:24 UTC
    Does this computer of yours have an OS (operating system)? Care to share what that might be?
Re: Copy files between computers
by jcoxen (Deacon) on Feb 10, 2006 at 16:17 UTC
    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