I would like to have a button to pack the selected files (or directories).
The target 7z file should have the current time and date in its name.
I have a small batch file, but I don't know how to use it in a TC button in such a way that it works on selections.
Probably I have to use the parameter /%S
How?
Code: Select all
@echo off
set y=%date:~6,4%
set m=%date:~3,2%
set d=%date:~0,2%
set hr=%time:~0,2%
if "%hr:~0,1%" == " " set hr=0%h:~1,1%
set min=%time:~3,2%
set sec=%time:~6,2%
set stamp=%y%.%m%.%d%_%hr%.%min%.%sec%
echo %stamp%
c:\tool\7z_cmd\7za.exe a file_%stamp%.7z source_file