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