On Oct 11, 2006, at 03:15, rick cusimano wrote:

> Thanks for all your help, guys.  Yes that makes a lot of sense.  I 
> didn't
> realise CWD only changed directory RELATIVE to the current directory.
>
> I've tried adding a '/' to the start of the path, but that didn't work.
> I've also tried a '\', but that didn't work either.

That's because your paths were already relative to another directory.

>   Whats the easiest way
> of changing to the root (or rather, the HOME) directory? I did 
> previously
> write a loop where it would CDUP as long as there were a certain 
> number of
> '\'s left in the current directory but I scrapped that...

Without viewing your code, I don't know how you are constructing your 
paths, but ideally you always want to know where you are in the 
hierarchy at any time.  If you do, then you don't really need to go 
back to the root after every file operation.  In any case, you should 
be able to go back to the root by issuing CWD('/').

 From what I understand, you want to download all the files in the 
server, and you are building a list of files to give to a second 
process that will download them.  Is this second process traversing the 
directories to download the files, or just using GET with the full path 
of each file without changing directories?

If it is just GETting the files from where it is, then you must ensure 
that each filepath you store is either absolute from the root, or 
relative to the home directory (which could be different, as Francois 
pointed out).

        dZ.

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to