Operating System - HP-UX
1825766 Members
2179 Online
109687 Solutions
New Discussion

Why it not going to another directory????

 
Ramana.Sv
Frequent Advisor

Why it not going to another directory????

Hi pls help me sir....
iam downloading files using FTP below is a small code, my problem is why its executing this part only ( lcd /prod/wel
cd /cde/wel
mget * ), why its not goign to another directory please help me sir

*********************************************
Code
*********************************************
lcd /prod/wel
cd /cde/wel
mget *





Thank you,
Ramana.
17 REPLIES 17
Robert-Jan Goossens
Honored Contributor

Re: Why it not going to another directory????

cd /cde/wel

is this the full PATH?
Ramana.Sv
Frequent Advisor

Re: Why it not going to another directory????

yes sir, lcd /prod/wel(Local system Directory) and cd /cde/wel (Remote system Directory).

its Full path whys this is happening?



lcd /prod/wel
cd /cde/wel
mget *
Anshumali
Esteemed Contributor

Re: Why it not going to another directory????

What about set -x, so that it can be checked where it is breaking.

Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Ramana.Sv
Frequent Advisor

Re: Why it not going to another directory????

>hat about set -x, so that it can be checked where it is breaking

where should i use this set -x ???????
Anshumali
Esteemed Contributor

Re: Why it not going to another directory????

in your script, 1st line, then run a test run....post results....
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Ramana.Sv
Frequent Advisor

Re: Why it not going to another directory????

Here iam sending output reult with attachment Please check the attachment.

only one directory is downloaded but its not going to another directory why????

Thank you
Hein van den Heuvel
Honored Contributor

Re: Why it not going to another directory????

So where is the output going?
Or does the problem happen with the input?
Is there an error message?
What is the error?

Please imagine you are a person who can not see the screens you are looking at. Now please re-read your own question. How can we possibly help if you only describe what you are doing, not what is happening and nothign about the environment?

How do you log into the FTP session?
What is the default ?
What does 'df /cde/wel' do?
How about 'ls -l /cde/wel' ?
and so on....
basic troubleshooting my friend, basic troubleshooting
question eveery step, verify every step.

Good luck!
Hein.

Hein van den Heuvel
Honored Contributor

Re: Why it not going to another directory????

Ah! You read my mind and provided much more info. Unfortuntately it does not provide a clue, at least not to me.

Hein.
OldSchool
Honored Contributor

Re: Why it not going to another directory????

i believe he wants ftp to get all files and sub-directories?
OldSchool
Honored Contributor

Re: Why it not going to another directory????

disregard the previous
Ramana.Sv
Frequent Advisor

Re: Why it not going to another directory????

i want copy files two from different directories, not subdirectories

=> /testdir/abc/
=> /testdir/xyz/



Thank's
Ramana
Ramana.Sv
Frequent Advisor

Re: Why it not going to another directory????

i want copy files from two different directories, not subdirectories

=> /testdir/abc/
=> /testdir/xyz/



Thank's
Ramana
A. Clay Stephenson
Acclaimed Contributor

Re: Why it not going to another directory????

Be very, very glad that you don't work for me. If I ever saw someone execute the series of FTP commands that this "code" does without a single-error check and then ask why doesn't this work, my next question would be "Where do you want to work next?". If you are going to use FTP to transfer files then have a look at the Perl Net::FTP module. It makes these operations easy and you get error checking almost for free.
If it ain't broke, I can fix that.
V. Nyga
Honored Contributor

Re: Why it not going to another directory????

Hi,

only a thought - could it be that the script want to execute the next 'lcd' and 'cd' before the 'mget' command has finished?
Can you shorten the list of files to get and put in a wait?

Volkmar
*** Say 'Thanks' with Kudos ***
OldSchool
Honored Contributor

Re: Why it not going to another directory????

suggest that you run the ftp session w/ the -v option, as in "ftp -v -n ..."
and post the results
Michael Mike Reaser
Valued Contributor

Re: Why it not going to another directory????

In addition to the "-v" option, I strongly suggst you include the "-i" option to the ftp command, so your statement would read

ftp -i -v -n ...

It appears that your ftp session is pausing, waiting on the confirmation that "mget" by itself requires on each file. The "-i" option on the ftp command tells ftp to *not* pause and prompt for confirmation of each file.
There's no place like 127.0.0.1

HP-Server-Literate since 1979
Michael Mike Reaser
Valued Contributor

Re: Why it not going to another directory????

Oh, and based on the library file listed in your ftp output, it appears that you're still trying to manipulate and otherwise use, in a completely unsupported and unworkable fashion, the software and intellectual property of Southeastern Data Cooperative, Inc., of Tucker, GA, USA http://www.sedata.com

I am intimately familiar with their naming scheme, and the file you listed in your mget output is one of SEDC's shared libraries, containing SEDC's copyrighted code, that should reside only under an SEDC-formatted root-based directory.

I strongly suggest - **STRONGLY** suggest - that you quit asking questions about the internal use and setup of SEDC's coprighted intellectual property in this forum and instead direct them to the owners of the software you are using, SEDC.
There's no place like 127.0.0.1

HP-Server-Literate since 1979