[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Wget append system date

From: Ángel González
Subject: Re: [Bug-wget] Wget append system date
Date: Mon, 14 Jan 2013 16:08:01 +0100
User-agent: Thunderbird

On 13/01/13 22:24, Wilson, Gary wrote:
> Hi Bart/Wget
> I need to upload a file and also append the system date to the uploaded
> file, how do you do this?
> Example:
> Uploaded file = wget.exe
> http://192.168.02/DataLog.html?FileName=Day_Shift_.csv
> The file needs to have the date appended to it as follows
> "DataLog.html?FileName=Day_Shift_14/1/2013.csv"

Does your OS allow slashes inside a filename? Otherwise, it can't be done.

On a POSIX shell you could provide the current date in the output
filename like this:
wget http://192.168.02/DataLog.html?FileName=Day_Shift_.csv -O
Day_Shift-`date +%d/%m/%Y`.csv

(replace the / with something else if not supported by your filesystem)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]