Forum Moderators: phranque
I am looking for a program/batch file/whatever I can RUN ON MY HOME PC (Windows XP Pro) that would allow me to upload many files at once to my web page (on a “Windows based server”, I believe that’s how to say it). I know I can simply run Windows Explorer, and create a “Network Place”, then just drag files over like it was just another directory on my PC. Done that. I want something more though.
What I want is something like this .... I want to be able to create a text file containing the paths/filenames of files on my PC, and the corresponding directory of my website where I want each file placed. Something like ...
C:\dir-one\file-a ...... www.mywebsite.com\this-dir\
C:\dir-one\file-b....... www.mywebsite.com\this-dir\
C:\dir-two\sub\file-1 .. www.mywebsite.com\this-dir\sub\
C:\dir-3\file-x ........ www.mywebsite.com\that-dir\yada\
I can take care of creating the list of files. It would NOT be the entire contents of directories ... just a file here and a file there, but many many files. So, drag and drop is inefficient.
I would want to have any existing files on the web site over-written with the new files. If the destination directory didn’t exist, I’d want it automatically created.
I do NOT want to have to do ANYTHING on the web side - no setting permissions, creating directories, etc. I want to do everything by running a batch file, script, program, whatever, on my local PC. I have Filezilla (the latest) but have yet to find a means for doing this with this program.
I figure that since I can already just drag and drop within Windows Explorer or Filezilla, that there has got to be a PC ONLY solution allowing me to do this.
Would greatly appreciate any advice.
have you tried Using FTP Batch Scripts [support.microsoft.com] and adding them to your Task Scheduler?
these resources might also be useful:
Microsoft Windows XP - Ftp [microsoft.com]
Microsoft Windows XP - Ftp subcommands [microsoft.com]
I can enter ...
C:>ftp
ftp> open my-domain-name.com
It connects and then I'm prompted for a user name and password, then Im in. I'm not sure if that is scriptable though ... it looks like its not.
I tried
c:>ftp
ftp> open (username):(password)@my-domain-name.com
and that does not work (I get "ftp: connect :Unknown error number").
My goal is to get some that is entirely run from a script.
I'm trying now to use something like ...
c:> ftp -s:filename
where filename is a file with commands to run. No luck yet.
Thanks
[edited by: phranque at 11:47 am (utc) on Sep. 1, 2009]
[edit reason] disabled graphic smileys ;) [/edit]
with cmdfile being something like
open my-domain-name.com
username
password
type binary
put I:\test\folder1\local-long-name\yadayada\cpc.jpg public_html/my-domain-name.com/remote-dir/cpcpic2.jpg
In order for the image file to be transfered correctly I had to change transfer type from default ascii. Put command works fine with long file names/paths, and I can apparently grab any local file and put it anywhere on the website ... all from the same single put command.
I'm off and running now.
Thanks