Welcome to WebmasterWorld Guest from 54.226.130.194

Forum Moderators: bill

Message Too Old, No Replies

Old school MsDOS question

     

Silicon

6:04 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



Ok using msdos for ftp. Don't ask why. I'm wondering how to copy multiple directories and subdirectories over to a remote machine. Is this possible? Seems so simple but mput looks like the only command.

iblaine

6:13 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



ftp doesn't allow you to upload directories. I think there are two ways around this. You can get an ftp gui like cuteftp. Or you can scp the file. If you can ssh into the server then you can get cygwin and scp directories, ex:
scp -rp localdir user@webserver:/tmp

bcolflesh

6:22 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mget & mput can help you out:

[home.att.net...]

Frank_Rizzo

6:25 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the subdirectories are the same each time, and there are not too many of them, you can put it all into a batch script.

I use psftp in batch mode for uploading certain files to different subdirs each day.

Task Scheduler runs every 5 minutes to detect if there are new files, if there are, psftp batch kicks in and uploads the files from different subdirs.

Silicon

6:33 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



Thanks for your help... I have cuteftp but it likes to refresh a list of files on the server before i can upload anything. Problem is that there are tens of thousands of files and the server times out before sending a list. Server doesn't support ssh and seems like every program or gui I install is similar in this way cuteftp. Any suggestions?

bcolflesh

6:34 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Read through my link - script the required ftp commands and schedule them with the Task Scheduler.

Silicon

6:48 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



Thanks again for the help. Yeah too many directories and subdirectories to script but I will check out the other options and try some more programs.

bcolflesh

6:53 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you go the GUI route - try FileZilla:

[filezilla.sourceforge.net...]

Frank_Rizzo

7:34 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is another method I use.

I have 4 directories, with 4 further subdirectories underneath each. Sometimes I want to upload lots of files in dira/subdirb and so on, therefore my original batch method is not effective.

So here's how I get around that.

The dir structure on the server is identical to the windows structure

dira/subdira
dira/subdirb
.
.
dird/subdird

All you have to do is to us PKZIP / WINZIP to zip the dir and subdirs then just ftp the ZIP file.

This has two advantages, 1) the subdirs are intact - you can have 1000's of files in different dirs, 2) the upload will be a lot quicker and it's easier for dropouts.

On the server, all you need to do then is to gunzip / untar but I use Linux version of PKZIP.

Of course, the other beauty is that if your subdirs has 1000's of files, but not all of them change each day, then you set the ZIP prog to just include 'changed' files.

Silicon

9:24 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



Frank_Rizzo,

hmmm gunzip...i'll have to check that out thx!