Mar 2nd, 2013
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM send.bat
  2. REM Send all files from the inputDir directory to the outputDir directory of the given username .
  3. REM
  4. REM Description:
  5. REM     This script has to be used with the pscp.exe of the putty suite.
  6. REM     You can find putty here:
  7. REM
  8. REM Version:    1.0
  9. REM Author:     Dieter Castel
  10. REM License:    Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
  11. REM             See: for more info.
  13. REM Variables
  14. REM     Changes where the files will be coppied to.
  15. set outputDir=/recieved
  16. REM     Changes where the files will be coppied from.
  17. set inputDir=./toSend/*
  19. @echo off
  20. REM Asks for your user name.
  21. set /p user="Enter your ssh user name:"
  22. echo "Sending all files in %inputDir% to"
  23. echo "Files with the same name will be OVERWRITTEN!!!!!!"
  24. echo "Press enter to continue or CRTL+C to exit."
  25. pause
  26. REM Uses putty copy
  27. REM -v for verbose messaging
  28. REM -r to copy all directories recursivly
  29. REM -2 force to use ssh2
  30. REM -scp use the scp protocol
  31. pscp -v -r -scp -2 -scp %inputDir%
  32. pause
Add Comment
Please, Sign In to add comment