Re: Zmana nazwy pliku

Autor: Piotr Smerda <piotrs00_at_go2hell.pl>
Data: Sun 27 Nov 2005 - 08:00:33 MET
Message-ID: <dm904iqb5cgj$.zwq3imt9l8iq$.dlg@40tude.net>
Content-Type: text/plain; charset="iso-8859-2"

On Fri, 25 Nov 2005 08:03:10 +0100, =Tade= wrote:

> Użytkownik "Artur Grdeń" <artur.grden_wytnij_to_@_wytnij_to_szewczykvw.pl>
> napisał w wiadomości news:dm4jl3$2mb$1@atlantis.news.tpi.pl...
>> =Tade= napisał(a):
>>> w katalogu mam pliki
>>>
>>> plik1.bkp
>>> plik2.bkp
>>> itd
>>>
>>>
>>> chcialbym napisac skrypt ktory w zaleznosci od biezacej daty zmieni
> nazwy
>>> plikow na
>>>
>>> plik1-data20051124.bkp
>>> plik2-data20051124.bkp
>>> czyli dodaje do nazwy kazdego pliku biezaca date , jak to zrobic
> szczegolnie
>>> mam problem z uzyskaniem biezacej daty do stringu to co w linux `date
> ....`
>>
>> zmienna srodowiskowa %date% i polecenie w stylu:
>> ren *.bkp "*.-%date%".bkp
>
>
> Dzieki w zupelnosci to wystarczy
> jak wyswietlic wszystkie zmienne srodowiskowe
> set nie wyswietla nawet %date%
>

<cite>
*If Command Extensions are enabled, then there are several dynamic
environment variables that can be expanded but which don't show up in
the list of variables displayed by SET. These variable values are
computed dynamically each time the value of the variable is expanded.*
If the user explicitly defines a variable with one of these names, then
that definition will override the dynamic one described below:

%CD% - expands to the current directory string.
%DATE% - expands to current date using same format as DATE command.
%TIME% - expands to current time using same format as TIME command.
%RANDOM% - expands to a random decimal number between 0 and 32767.
%ERRORLEVEL% - expands to the current ERRORLEVEL value
%CMDEXTVERSION% - expands to the current Command Processor Extensions
    version number.
%CMDCMDLINE% - expands to the original command line that invoked the
    Command Processor.

</cite>

-- 
Pozdrawiam
Piotrek
Received on Sun Nov 27 08:05:14 2005

To archiwum zostało wygenerowane przez hypermail 2.1.8 : Sun 27 Nov 2005 - 08:42:08 MET