Automator to open random file on Windows share
The following example Automator workflow works for me:





on run {input, parameters}

    set thisFolder to (item 1 of input as string)

    tell application "Finder"
        set randomFolder to some folder in folder thisFolder
        open some file in randomFolder
    end tell

end run




Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate/needed/wanted. The onus is upon the user to add any appropriate error handling as may be appropriate/needed/wanted.