You are not logged in.

#1 2010-04-06 15:39:14

mightytater
Member
Registered: 2010-04-06
Posts: 1

smbclient rm -r *

Hey All,

I'm fairly new to Archlinux, and I think its great... but I have a platform independant problem with smbclient.  In a script, I am connecting to a windows share that has a number of directories, and I don't know their names.  However, before the script is finished, it should perform rm -r * (or DOS deltree *) in the windows share to clean it up. 

smbclient \\\\server\\share -A authfile -c "rmdir /s /q *"

doesn't work; rmdir doesn't support wildcards. 

I also get a message:
NT_STATUS_OBJECT_NAME_INVALID removing remote directory file \/s
I get something similar if I use two forward slashes, two backward slashes or any other combination of forward and backward slashes preceeding the /s ... but that's probably not important right now if smbclient isn't supporting wildcards.

Any ideas certainly appreciated, and many thanks in advance!

Offline

#2 2010-04-09 18:35:47

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: smbclient rm -r *

Maybe mount the directory instead? And then simply use rm.

Offline

Board footer

Powered by FluxBB