|
Post by marylandwx on Oct 1, 2010 11:19:42 GMT -5
I am trying to create an action that will run at the top of the hour, every hour that will upload a basic conditions file to my website.
My issue is, I want to be able to see every hour's output. Is there a way to use the %Time% or some other variable in the file name so that it won't simply overwrite itself each time it runs?
Also, is there a "delete" action? I would like to delete the local file after it is ftp'd.
|
|
|
Post by John Liss on Oct 1, 2010 15:44:12 GMT -5
Yes you can use the %Time% (note the exact case) variable in the action file. www.lissproductions.org/wuhu_manual/using_variables_within_actionsSo your action file looks like: time(00:00,23:59,0):template:"C:\TEMP\INTEMP.TXT" "C:\TEMP\OUTTEMP%Time%.TXT" ftp:/bob:fido@myserver.com "C:\TEMP\*.*" "\data\" time(00:00,23:59,0):"del C:\TEMP\OUTTEMP*.TXT"
|
|
|
Post by marylandwx on Oct 1, 2010 15:57:15 GMT -5
Thanks for the reply!
When I try to name the file "hourly%Time%.php the file name ends up coming out as "hourlyimephp"
Any ideas?
|
|
|
Post by wuhusoftware on Oct 5, 2010 16:25:14 GMT -5
You can use any of the following for replacement strings in the filenames themselves:
%a
Abbreviated weekday name
%A
Full weekday name
%b
Abbreviated month name
%B
Full month name
%c
Date and time representation appropriate for locale
%d
Day of month as decimal number (01 – 31)
%H
Hour in 24-hour format (00 – 23)
%I
Hour in 12-hour format (01 – 12)
%j
Day of year as decimal number (001 – 366)
%m
Month as decimal number (01 – 12)
%M
Minute as decimal number (00 – 59)
%p
Current locale’s A.M./P.M. indicator for 12-hour clock
%S
Second as decimal number (00 – 59)
%U
Week of year as decimal number, with Sunday as first day of week (00 – 53)
%w
Weekday as decimal number (0 – 6; Sunday is 0)
%W
Week of year as decimal number, with Monday as first day of week (00 – 53)
%x
Date representation for current locale
%X
Time representation for current locale
%y
Year without century, as decimal number (00 – 99)
%Y
Year with century, as decimal number
%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown
%%
Percent sign
|
|
|
Post by marylandwx on Oct 5, 2010 17:06:25 GMT -5
Ah ha! Those work! Thanks so much!
Edit: I am still having trouble with the "del" function. I can't seem to get it to work. Is the syntax above correct?
|
|
|
Post by wuhusoftware on Oct 5, 2010 19:04:03 GMT -5
Try:
time(00:00,23:59,0):system:del "C:\TEMP\OUTTEMP*.TXT"
System would be required since del is really a request to the command processor (CMD.exe) rather than being a stand alone program (like DEL.EXE for example).
If that does not work, let me know.
|
|
|
Post by marylandwx on Oct 5, 2010 21:37:37 GMT -5
Worked! Thanks!
|
|
|
Post by John Liss on Oct 12, 2010 10:25:08 GMT -5
added these vars to the manual.
|
|