how to delete the contents of a directory using smbclient?
I need to smbclient into a machine and delete a directory - I'm on a Linux box, but the directory to delete is on a windows box. I want to do it as a one line command so I can write a script to do the same thing on several computers... here's the setup:
smbclient //node001/c$ power -UAdministrator
get's me into the computer.
the directory that needs to be removed is /co_274/rib/scenes/ (I really only need to delete the files in that directory, but deleting the whole directory is fine.)
I've tried:
smbclient //node003/c$ power -UAdministrator -c co_274/rib/scenes ;
smbclient //node003/c$ power -UAdministrator -c co_274/rib/scenes/*.rib ;
smbclient //node003/c$ power -UAdministrator -D co_274/rib/scenes/ -c rm *.rib ;
but none of them seem to work. If I use the -D without the -c, it does start up in the correct directory, but with the -c, I get "no match"
I will eventually write a script to do this on "node001 - node025"
any ideas?
Thanks
Last edited by BrianK; 09-04-2002 at 09:01 PM.
|