Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Help debugging simple .bat that worked on XP

04 Jun 2011   #21

Windows 8.1 Pro RTM x64

You're welcome.

I did test the code thoroughly prior to posting it (substituting another variable for the date so that I could check the code operation).

My System SpecsSystem Spec
04 Jun 2011   #22

Windows 8.1 Pro RTM x64

As a matter of interest, you can modify the above code so that it matches the date format on your system. All you need to do is to make changes to the relevant section(s) in the code I provided. The lines to amend are shown below, with the relevant parts in RED. These are the pointers to the first character in the relevant part of the date string.

if "%_major%"=="5" set datefolder=%date:~4,2%_%date:~7,2%_%date:~10,4%-%hour%*%time:~3,2%*%time:~6,2%
if "%_major%"=="6" set datefolder=%date:~0,2%_%date:~3,2%_%date:~6,4%-%hour%*%time:~3,2%*%time:~6,2%
If you want to change the order of the date component,e.g. so that the year comes first instead of last, you need to change the order of the items in BLUE. Don't forget to change the appropriate RED item as well (they form a pair).
My System SpecsSystem Spec
04 Jun 2011   #23

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64

Well done for putting the effort in Dwarf.

I would have done this - but they both work fine.

for /f "tokens=3" %%A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion') do set osv=%%A
set nt=%osv:~0,1%
My System SpecsSystem Spec


 Help debugging simple .bat that worked on XP

Thread Tools

Similar help and support threads
Thread Forum
Autocad worked Ok in XP why not in W7?
I've been using AutoCad 2004 in Wxp for years. But it wont work in W7. I've tried installing Oracle virtual box but it still wont run. I'm at the end of what I know can anyone help. Thanks
Need help debugging CBS.log
Hi, I did sfc scan today and ran into some trouble. CMD output was: Beginning system scan. This process will take some time. Beginning verification phase of system scan. Verification 100% complete.
BSOD Help and Support
Windows Installer - Simple Fix that worked for me.
All the complicated fixes I've tried even those from Microsoft did not work. This one below work perfectly tor epair Windows Installer issues: HERE IS THE FIX THAT WORKED FOR ME : Start, then Run, then type regedit Go to HKEY_LOCAL_MACHINE\SYSTEM\CURRENT CONTROL ...
General Discussion
debugging help
Hi People, first post here, can anyone help me with this mini dump file i don't know how to fix my windows symbols so thought it would be easier to ask for help. been having a few BSOD lately. I'm running win 7 ultimate x64 retail
BSOD Help and Support
new to debugging
Hi please help trying to view my DMP file with kernell debugger and a black dos screen flashes really quick but goes i cant view anything ..Please help me cuz i want to find out what is wrong with my computer. Here are the bluescreens.
BSOD Help and Support
Games that Worked ok for me
Games that Worked ok for me: 1) NFS MW (1.3) 2) NFS Carbon (1.4) 3) Psi-Ops 4) Mass Effect

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:19.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App