Instantly share code, notes, and snippets.

Embed
What would you like to do?
Downloading Files via JRunscript
//Windows - download from web server
jrunscript -e "cat('http://x.x.x.x/file.txt')" > C:\Temp\file.txt
jrunscript -e "cp('http://x.x.x.x/file.txt','C:\\Temp\\file.txt')"
//Windows - download from file share
jrunscript -e "cat('\\\\x.x.x.x\\folder\\file.txt')" > C:\Temp\file.txt
jrunscript -e "cp('\\\\x.x.x.x\\folder\\file.txt','C:\\Temp\\file.txt')"
//Linux & macOS - download from web server
jrunscript -e "cat('http://x.x.x.x/file.txt')" > /tmp/file.txt
jrunscript -e "cp('http://x.x.x.x/file.txt',’/tmp/file.txt')"
//Linux & macOS - download from file share
jrunscript -e "cat('\\\\x.x.x.x\\folder\\file.txt')" > /tmp/file.txt
jrunscript -e "cp('\\\\x.x.x.x\\folder\\file.txt',’/tmp/file.txt')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment