Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using FTP

Status
Not open for further replies.

SteveHFS

IS-IT--Management
Jun 7, 2002
11
GB
Hi,

I'm trying to use FTP on NT4 to pull down around 300 items from one of our unix boxes. However, when I try it I keep getting and 'arguments too long' error. e.g.

ftp> Connected to xxxxx
open las
220 uk3 FTP server (UNIX(r) System V Release 4.0) ready.
User (xxxxxx:(none)):
331 Password required for sn.

230 User sn logged in.
ftp> ftp>
cd /user2/db
250 CWD command successful.
ftp> Connected to xxxxxx

Type: ascii; Verbose: On; Bell: Off; Prompting: On; Globbing: On

Debugging: Off; Hash mark printing: Off

ftp> status
mget *.p
Arguments too long

200 Type set to A.
ftp> close
221 Goodbye.
ftp> bye

I was hoping to build up a simple script to run overnight but have reached this 'wall'. Anybody got any ideas?

Thanks.
 
It doesn't look like there is a separator between "status" and "mget" - I think this may be the problem (try removing the status command, or putting a carriage return beforehand).

John
 
Hi,

THanks for responding so quickly. However, I should have checked my example better as dumping the outut into a file seems to have rearranged the lines. This is the script I am running.

open las
sn
**password**
cd /user2/db
status
mget *.p
close
bye

There is a carraige return between each line. Truly sorry to mislead you. The problem is still outstanding.
 
I suggest you still take out the status command - it looks like it's reading the output of the status message as input - therefore "arguements too long" - try running it manually to see if you get the same error.
 
Hi,

Thanks for replying. It is exactly the same problem with or without the status in there and either running by script or doing each line manually in a command line window. I've since been told by our techie that this is very very old version of Unix I am trying to talk to so the problem may lie there. Unfortunately, it is our only unix box so I cannot try against a newer version.

I think that this is going to become one of life's great unanswered questions.

Thank you everybody for your attention.
 
Steve

Does it work if you "get" just one particular file, rather than mget?
I realise that doing 300 get commands would take a long time to write and significantly extend the length of the script, but it may make your script work.

John
 
Yep, works perfectly with one get.

I think you are right, if I really want an automated overnight run of this I'll have to build up a list of all the files and append a get in front of them. Thanks for the suggestion.

Steve



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top