Copying Files from Local Machine

I am trying to create a script that will upload a file from my local machine onto my web server. I do not want to use a form, I want it to be automated within the script. I have looked for tutorials, but all seem to deal with copying files around the server but not from the local machine.

Is this possible? If so, could somebody point me in the right direction? Any help would be apreciated.

This implies the server has absolute control over your machine.As micah said, you have SOME options if you're on localhost, because you may be able to execute commands to move files around but that would be moving files on the server which you mentioned it was not. So there isn't an answer from me.

Ok, well slightly off topic but a continuation of the original problem, does anybody know if it is possible to upload a file through a form but without the file upload dialogue box, ie php could get a local file path from database, and then through a form, this file is uploaded and then I could get it with $_FILES var using PHP? Basically I would be eliminating the users choice of what file to upload and replacing it with a pre set filepath.

I know this is probably going to be a javascript so apologies, but if anybody knows if it is possible or not, that would be great.

I'm not aware of a way to change the value of a file input but I have seen implementations of multiple uploads through Javascript, but it still seems a bit intrusive which may mean that it is not supported.

What exactly is it that you want? A way to add new files to a server automatically? Because I know there are many ways to do this with a FTP program (at least on a mac, though I imagine there are even more ways to do it with Windows). This would allow you to say, put a file in a "dropbox" folder that is checked nightly for updates and sync'd with the server. If you wanted to add some extra bells and whistles - say update a DB with a new table entry representing the new file - you could create a cron script that runs nightly (but after the FTP one) and executes some PHP. For example it might check the uploads folder on your server and if it finds a new file it adds it to the DB.