[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Wget append system date
From: |
Wilson, Gary |
Subject: |
Re: [Bug-wget] Wget append system date |
Date: |
Mon, 14 Jan 2013 20:58:24 +0200 |
Yes I will be using MS DOS command prompt and will run this script on a
scheduled date/time using MS Windows task scheduler. Will the below
script still work and how will I type this out in DOS prompt exactly, is
the below correct?
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do wget
http://192.168.02/DataLog.html?FileName=Day_Shift_.csv -O
Day_%%D_%%B_%%C.csv
The goal is to append the system date onto a wget uploaded csv file...
Kind regards
Gary Wilson
Siemens Industry
South Africa
Tel: +2711 652 3698
-----Original Message-----
From: Random Coder [mailto:address@hidden
Sent: 14 January 2013 08:46 PM
To: Wilson, Gary
Subject: Re: [Bug-wget] Wget append system date
On Mon, Jan 14, 2013 at 9:47 AM, Wilson, Gary <address@hidden>
wrote:
>
> Please note that this command will need to execute within MS DOS, will
this still work?
>
> wget http://192.168.02/DataLog.html?FileName=Day_Shift_.csv -O
> Day_Shift-`date +%d/%m/%Y`.csv
>
No. DOS doesn't support slashes in filenames, and doesn't support the
back tick syntax.
Assuming you meant a command prompt window in Windows, you can do
something like this:
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do wget
http://192.168.02/DataLog.html?FileName=Day_Shift_.csv -O
Day_%%D_%%B_%%C.csv
Which may or may not work depending on your locale settings. You need
to use two % symbols each time in a script, if you try it at the prompt
directly, use one % symbol each time. If you're actually using DOS, I
have no clue how much of this will work.
________________________________________________________________________________________
Disclaimer and Confidentiality Note
This e-mail communication, its attachments, if any, and any rights attaching to
it are, unless the context clearly indicates otherwise, the property of Siemens
(Pty) Ltd. It is confidential, private and intended for the addressee only. If
you are not the intended recipient and receive this communication in error, you
are hereby notified that any review, copying, use, discloser or distribution in
any manner whatsoever is strictly prohibited. Please notify the sender
immediately that you have received this e-mail in error and delete the e-mail
and any copies of it. Views and opinions expressed in this e-mail are those of
the sender unless clearly stated as those of Siemens (Pty) Ltd. Siemens (Pty)
Ltd accepts no liability for any loss or damage whatsoever, and howsoever
incurred or suffered resulting or arising from the use of this e-mail
communication and/or its attachments.
Siemens (Pty) Ltd does not warrant the integrity of this e-mail communication
nor that it is free of errors, viruses, interception or interference.
Siemens (Pty) Ltd, its divisions and subsidiary companies (Siemens) expressly
excludes sections 11, 12, and 13 of the Electronic Communications and
Transactions Act, 25 of 2002 (the ECT) in respect of e-contracting. No data
message or electronic communication will be recognised as having a legal
contractual status under the ECT Act. All agreements concluded by Siemens will
only be legally binding when reduced to physical writing and physically signed
by a duly authorised representative of Siemens.
For more information about Siemens (Pty) Ltd, visit our website at
www.siemens.com
Siemens (Proprietary) Limited
Company Registration Number: 1923/007514/07
Registered Address: 300 Janadel Avenue, Halfway House 1685
VAT Registration Number: 4790104428
Chairman: Dr S Russwurm*
Chief Executive Officer: SG Proebstl*; Chief Financial Officer: SU Dall'Omo*
Executive Directors: AM Mathole; R Nkuhlu
Non-Executive Directors: R Guntermann*; Dr MI Surve
Alternate Directors: I Amod; JK Winter*
*German