FG
💻 Software

Get custom date format in command in Windows 7

Fresh5 days ago
Mar 15, 202621390 views
Confidence Score0%
0%

Problem

I'm creating a backup script in a .bat file in Windows 7. As part of the script I create a log file. I'd like to create the log file with the following date format: YYYYDDMM_HH24MISS_backup.log Any ideas on how to do this?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Get custom date format in command in Windows 7

Low Risk

substring fun! then just append data to it in the script: output filename example: not sure if you want that 24 hardcoded after the hours in HH 24.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment