Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Date and Time

Jun
11
0
I have been using TCC since it was known as 4Dos. I have created aliases for adding files to a zipped file.

wz="c:\Program Files (x86)\Winzip\wzzip.exe"
zm=wz -m %1 %2 (where %1 is the name of the zipped file to create/use and the %2 are the files to add/move.)
zmt=wz -m %1 (I need code to add the date and time to %1) %2

I would like to make the alias create the zipped file with its name myfile071320111115.zip
Where the 07132011 is the date and the 1115 is the time.
I would like tcc to be able to do this without the need for me to do it manually like Ren myfile.* myfile071320111115.*

Any help would be appreciated.
 
I would like to make the alias create the zipped file with its name myfile071320111115.zip
Where the 07132011 is the date and the 1115 is the time.

The current date and time, or the date and time from the file's time stamp?
 
Hallo harvey,


> I would like to make the alias create the zipped file with its name
> myfile071320111115.zip
> Where the 07132011 is the date and the 1115 is the time.

I'd prefer the format 20110713111508 (yyyymmddhhmmss) because then its
easy to sort the files chronoöogically, and adding seconds, your less
likely to end up with 2 identical names.

Best regards,

* Klaus Meinhard *
<www.4dos.info>
 
I have been using TCC since it was known as 4Dos. I have created aliases for adding files to a zipped file.
wz="c:\Program Files (x86)\Winzip\wzzip.exe"
zm=wz -m %1 %2 (where %1 is the name of the zipped file to create/use and the %2 are the files to add/move.)
zmt=wz -m %1 (I need code to add the date and time to %1) %2
I would like to make the alias create the zipped file with its name myfile071320111115.zip
Where the 07132011 is the date and the 1115 is the time.
I would like tcc to be able to do this without the need for me to do it manually like Ren myfile.* myfile071320111115.*

Any help would be appreciated.

Well, you could start with something like this:

Code:
alias zmt=`echo wz -m %@path[%1]%@name[%1]-%@format[02,%_month]%@format[02,%_day]%[_year]%@format[02,%_hour]%@format[02,%_minute].zip`

Test that, and if it gives the kind of filenames you want, remove the ECHO.
 
I'd prefer the format 20110713111508 (yyyymmddhhmmss) because then its easy to sort the files chronoöogically, and adding seconds, your less likely to end up with 2 identical names.
<www.4dos.info>

It's also somewhat easier to code....

</www.4dos.info>
 
Just in case you missed it, the command
would use the variable _DATETIME to get the current date and time.

alias zmt=`wz -m %1%_DATETIME`

-Scott

Charles Dye <> wrote
on 07/15/2011 10:12:40 AM:


> Quote:
>
> Originally Posted by K_Meinhard [image removed]
> I'd prefer the format 20110713111508 (yyyymmddhhmmss)
because then

> its easy to sort the files chronoöogically, and adding seconds,
> your less likely to end up with 2 identical names.
>
> It's also somewhat easier to code....
>


>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Charles Dye
>
 
Back
Top