smbAuth = new NtlmPasswordAuthentication("bob.com", "joe", "smoe")
fullPath = "smb://bob.com/media$/blah.txt"
smbFile = new SmbFile(fullPath, smbAuth)
if(smbFile.exists()) {
smbDate = new Date(smbFile.getLastModified())
println "Date on SMB file: ${smbDate}"
}
The above example connects to the samba machine, gets the file we want, and then gets and prints the modified date on that file. You can use this library to write quick scripts to sync files from a non samba machine to another machine (Windows?).