Re: Detecting shares using walk_dir()

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
ghaberek said...

This code works for me. Make sure you're properly escaping your backslashes as shown below (in your example you are not).

include std/console.e 
include std/filesys.e 
 
function look_at( sequence path, sequence item ) 
 
    display( item[D_NAME] ) 
 
    return 0 
end function 
 
walk_dir( "\\\\localhost\\c$", routine_id("look_at") ) 

Not sure this helps .. the OP wants to get the list of shares on a machine, not look inside a specific share. Something akin to "smbclient -L machine" IIUC.

petelomax said...

What OS are you on?

Again, I'm not sure if this helps, but it's probably safe to say that the OP is using some version of windoze.

I know the server names, I don't know the shares. Over time they may even be changed (new added, old removed, etc)

And sorry, yes, it is windows (forgot to mention that in my post).

Kenneth aka ZNorQ.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu