Samba lessons needed

Bob Warren bobwarren at
Tue Feb 20 00:23:18 EST 2007

At the moment in Brazil everyone's dancing the samba like mad in the 
yearly carnival, but I'm ashamed to say that although I've lived here 
for well over 30 years, I still can't dance (too busy sitting in front 
of a computer). So perhaps one of you can help me learn at long last.

If I want a directory of my home network, I can type the following into 
my Ubuntu terminal:


It asks for a password, but this can be null.

To do the same thing in Rev, I do this:

  open process "/usr/bin/smbtree" for read
  read from process "/usr/bin/smbtree" until eof
  put it into field "test"
  close process  "/usr/bin/smbtree"

Works like a charm, and doesn't even ask for a password.

Now I want to get the directory of my Windows computer's drive C:\ over 
the network (the name of the computer is "john").

In the Ubuntu terminal, the following works perfectly and I get a 
listing of my Windows drive:

  smbclient \\\\john\\c mount
(CTRL+Z exits Samba)

Now here's where I fall flat on my face. I have tried this and a 
thousand other variations in Revolution:

  put "/usr/bin/smbclient \\\\john\\c mount" into procToDo
  [I have also tried this for example:
  put "smbclient\ \\\\john\\c\ mount" into procToDo]

  open process procToDo for update
  write "dir" to process procToDo   [or "dir" & return]
  read from process procToDo until eof
  put it into field "test"
  close process  procToDo

*** Might it need a simulation of the operator's CTRL+Z here? How do you 
do that in Rev? But "quit" works in the terminal too, and I have tried:
write "quit" to process procToDo

However, it seems that the CTRL+Z or QUIT is not the problem. Samba is 
not finding my Windows server. The problem appears to be in the first line.

If anyone knows how to dance the samba better than I do, I'd be grateful 
for a quick lesson.

Regards to all,


More information about the Use-livecode mailing list