Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Batch file to compress wildcard target to ZIP file with same name

$
0
0

We are not allowed to use WinZip command line, compress.exe from the Windows Toolkit, PowerShell , or anything else for that matter.

I have found a few batch files that will "work", but the result is a fixed-name output file.

Example from Tom Lavedas

I need the output filename to be dynamic. Using a wildcard for the input (e.g., "DDmmmYYYY*.txt") that will only ever match to one file, but that name changes daily because it has the date embedded in it.

I'm sure it's a simple tweak. Can anyone help? Thanks.


Viewing all articles
Browse latest Browse all 15028

Trending Articles