windows-ftp-upload.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. AUTOMATIC FTP UPLOAD BATCH FILE FOR WINDOWS
  2. -----------------------------
  3. Batch file located in the bottom of this file.
  4. pisg.bat notes:
  5. ---------------
  6. Change the paths and such so they make sense with your config and have fun all
  7. you poor m$ users. ;) (NOTE: You may need to change the last line to 'ftp
  8. -s:%f0' on some old NT systems.) Basically just put all your ftp commands
  9. between the 'goto skip' and ':skip', and put any commands you want executed
  10. BEFORE IT (like pisg) at the end. The batch file will ignore the ftp stuff
  11. because of the goto, and the ftp script will ignore the one command it doesnt
  12. recognize(goto) with a small complaint and no error.
  13. Installation of .bat file:
  14. --------------------------
  15. (described with Windows 2000 in mind)
  16. Go to Start->Settings->Control Panel->Scheduled Tasks
  17. Select "Add Scheduled Task.
  18. On the screen where it asks, browse to your batch file and hit next.
  19. Give the task a name (doesn't matter)
  20. Select "Perform this Task Daily".
  21. Start Time: 12:00 AM / Every Day / Start Date - default
  22. Enter in the account you want it to run as w/ the password. (I recomend an
  23. admin account, but it shouldn't matter)
  24. Check the []Open advanced properties box and hit Finish
  25. Go to the Schedule Tab.
  26. Click Advanced.
  27. Clear the End Date if it's checked. Check Repeat Task, put in every X hours (I
  28. have 6), and put duration to 24 hours. This should repeat the task in whatever
  29. increment you selected throught the day. Then it restarts the task on the next
  30. day.
  31. That should do it, play around with the settings until you think you have what
  32. you want. The way tasks are implemented are very wierd, but it works. ALso
  33. look into the 'at' command in the windows help for a command line version which
  34. may be easier to set up.
  35. -----------------------pisg.bat----------------------------
  36. goto skip
  37. OPEN your.ftp.server.com
  38. username
  39. password
  40. CD /yourdir
  41. PUT "C:\Program Files\WinBot\Logs\pisg-0.37\index.html"
  42. QUIT
  43. :skip
  44. cd "C:\Program Files\WinBot\Logs\pisg-0.37\"
  45. perl "C:\Program Files\WinBot\Logs\pisg-0.37\pisg"
  46. ftp -s:%0