Hi,
the function ls and recls works different with files square brackets are include in the filename.
The ls function works well with the “||” and “&&” operations.
At the example you are able to see, that if the file doesn’t exists the “||” works well by ls, with recls it doesn’t.
By Files without square brackets in the filename the “||” and “&&”works also correctly by cls.
lftp admin <at> localhost:/Alfresco/tmp> ls subdir1/KW48_Do_N[LIDGWH].pdf
-rw-rw-rw-
1 user group 0 Nov 30 19:09 KW48_Do_N[LIDGWH].pdf
lftp admin <at> localhost:/Alfresco/tmp> ls -1 subdir1/KW48_Do_N[LIDGWH]x.pdf || echo test
ls: Fatal error: 500 Invalid path
test
lftp admin <at> localhost:/Alfresco/tmp> ls -1 subdir1/KW48_Do_N[LIDGWH]x.pdf && echo test
ls: Fatal error: 500 Invalid path
lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N[LIDGWH].pdf
lftp admin <at> localhost:/Alfresco/tmp>
lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH].pdf
subdir1/KW48_Do_N[LIDGWH].pdf
lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH]x.pdf || echo test
lftp admin <at> localhost:/Alfresco/tmp>
lftp admin <at> localhost:/Alfresco/tmp> recls -1 subdir1/KW48_Do_N\[LIDGWH]x.pdf && echo test
test
regards,
Peter Naber
Peter Naber
Dipl. Inform (FH)
alfa Media Partner GmbH
Carl-Zeiss-Straße 27
63322 Rödermark
Germany
Phone: +49 (0) 6074 / 3104-390
Fax: +49 (0) 6074 / 3104-112
Visit our homepage
www.alfamedia.com
Sitz des Unternehmens:
Rödermark - AG Offenbach HRB 21171
Geschäftsführer: Jens Emmerich
Diese Nachricht
kann vertrauliche Informationen enthalten und ist nur für die namentlich bezeichneten Empfänger bestimmt.
Falls Sie nicht namentlich als Empfänger dieser Mitteilung angeführt sind, bitten wir Sie diese Mitteilung nicht zu kopieren oder weiterzuleiten.
Bitte informieren Sie uns per E-Mail, falls Sie diese Mitteilung fälschlicherweise erhalten haben.
This message may contain confidential information
and is intended only for the individual named.
If you are not the named addressee please do not disseminate, distribute or copy this e-mail.
Please notify the sender by e-mail if you have received this e-mail-message by mistake.