You must already know how to use batch commands to use this page. I accept
Batch Commands - Windows 7
The following is a test program that works in Windows 7. This page was created because most batch programs for creating date variables in Windows XP do not work in Windows 7. Copy this text into a file called test.bat and run it to see if it displays today's date in 3 formats. (If it doesn't, do a google search for "batch programs for date".)
echo Date Format: dd-mm-yy
echo Date Format: yy-mm-dd
echo Date Format: yymmdd
Batch Program Example
The following is a batch program for Windows 7 that uses 7z, the command line version of the free compression utility 7-Zip (download) to create a .zip file. (ou may use any compression utility that has a command line option.) This is an example - you must edit it to suit your requirements. You may also create a dated folder name, and then create another command to copy files into it.
echo Zip up all DOC files in this folder:
set Folder="C:\Users\Pat\My Documents"
rem Set variable for date in format yymmdd
rem Run 7-Zip to create a dated ZIP file in drive H
"C:\Program Files\7-Zip\7zFM.exe" a -tzip H:\Docs_%Date% %Folder%\*.doc*
The PDQ Library is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.