Thanks Alexander,

Re: [lftp] tell if file is directory

I have used the cd test in other scripts but didn’t think of it here!  Will 
give it a shot.

On another note:

I am running lftp from and Expect/TCl script which is interactive and pipe the 
output to a file. This is on OSX 

Everything is working great but I just discovered that commands with paths with 
more then 30 chars ( sometimes 32, 34 but always more than 34 won’t work) in 
them are hanging. It is hard to reproduce in terminal since there are multiple 
commands run in sequence, cd mirror etc…  I don’t know if this is lftp hanging 
or some odd effect from the Expect Script. If you have any thoughts as to where 
I can look to understand what is causing it - I would appreciate it.

Thanks as always,  Rob


 




On Jan 30, 2014, at 5:02 PM, Alexander Lukyanov <lavv...@gmail.com> wrote:

> You can try to use "cls" command, then analyze the output, or just try to 
> "cd" to the could-be-directory and act depending on the resulting exit code, 
> like this:
> 
>    cd DIR && do-something
>    cd DIR || do-something-else
> 
> 
> 
> 2014-01-27 Robert DuToit <rdut...@comcast.net>:
> Hi Alexander,
> 
> Is there a way to tell if a file is a directory via lftp on server. I need to 
> differentiate for a script that downloads various chosen files and folders.
> 
> Locally no problem as I can just use the TCL command:
> 
> set is_dir  [file isdirectory $this_file]
> 
> Thanks,  rob
> 
> 
> 
> 
> _______________________________________________
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
> 


_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to