Hello, Im trying: if smbclient //server/service -U user -password test -c 'rmdir testedir' then echo works else echo dont works fi But if command rmdir is success or not i got works... Any ideias? echo $? aways returns 0 too. Thanks, Juliano Rodrigues.