This should give you an idea

Code:
  
break on

$Textbox.OnClick = 'TextBoxOnClick()'
.
.
.
function TextBoxOnClick()
dim $serverPath,$localPath
$serverPath = '\\Server\Share\' + $Textbox.text
$localPath = 'c:\data'
if exist($serverPath)
copy $serverPath + '\*.*' $localPath /c /h /r /s
endif
endfunction