summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-07 19:45:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:27 -0500
commitb81b6b31c5da2d4aade3120ea436a0433fbf025f (patch)
tree1772cb590cabf94585661c3e208a802178260828 /source3/client
parent062a22be47261d6a447e66f96a4988be1fe2dd20 (diff)
downloadsamba-b81b6b31c5da2d4aade3120ea436a0433fbf025f.tar.gz
samba-b81b6b31c5da2d4aade3120ea436a0433fbf025f.tar.bz2
samba-b81b6b31c5da2d4aade3120ea436a0433fbf025f.zip
r21750: Sync up with SAMBA_3_0_25. Only client changes are in libsmbclient
right now. Jeremy. (This used to be commit 6dd5f0ef0fe3a673081e16e656ca579bf50457ff)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 5a1a812fe9..be5796eff0 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1714,6 +1714,37 @@ static int cmd_del(void)
}
/****************************************************************************
+ Wildcard delete some files.
+****************************************************************************/
+
+static int cmd_wdel(void)
+{
+ pstring mask;
+ pstring buf;
+ uint16 attribute;
+
+ if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ d_printf("wdel 0x<attrib> <wcard>\n");
+ return 1;
+ }
+
+ attribute = (uint16)strtol(buf, (char **)NULL, 16);
+
+ if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ d_printf("wdel 0x<attrib> <wcard>\n");
+ return 1;
+ }
+
+ pstrcpy(mask,cur_dir);
+ pstrcat(mask,buf);
+
+ if (!cli_unlink_full(cli, mask, attribute)) {
+ d_printf("%s deleting remote files %s\n",cli_errstr(cli),mask);
+ }
+ return 0;
+}
+
+/****************************************************************************
****************************************************************************/
static int cmd_open(void)
@@ -3211,6 +3242,7 @@ static struct
{"unlock",cmd_unlock,"unlock <fnum> <hex-start> <hex-len> : remove a POSIX lock",{COMPL_REMOTE,COMPL_REMOTE}},
{"volume",cmd_volume,"print the volume name",{COMPL_NONE,COMPL_NONE}},
{"vuid",cmd_vuid,"change current vuid",{COMPL_NONE,COMPL_NONE}},
+ {"wdel",cmd_wdel,"<attrib> <mask> wildcard delete all matching files",{COMPL_REMOTE,COMPL_NONE}},
{"logon",cmd_logon,"establish new logon",{COMPL_NONE,COMPL_NONE}},
{"listconnect",cmd_list_connect,"list open connections",{COMPL_NONE,COMPL_NONE}},
{"showconnect",cmd_show_connect,"display the current active connection",{COMPL_NONE,COMPL_NONE}},