Code: Select all
:: 13.08.2011
:: Dxdiag Miner 1.1 by Morrolan, made for #Minecrafthelp at EsperNet.
:: Feel free to redistribute and/or modify the file at will, but it'd be nice if you were to give the author credit.
:: Turn off echoing commands to the console, set colour to light green.
@echo off
Color 0A
echo Dxdiag Miner v1.1
:: Check for dxdiag.exe, in case not found go to Dxdiag_Not_Found.
echo Checking for dxdiag.exe...
if not exist %systemroot%\system32\dxdiag.exe GOTO Dxdiag_Not_Found
echo Dxdiag.exe found.
:: Execute dxdiag.exe, pass the path to the file.
echo Creating dxdiag file, please stand by...
echo off
set today=%date:~7,2%-%date:~4,2%-%date:~10,4%
echo %today%
%systemroot%\system32\dxdiag.exe /t %USERPROFILE%\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue
Screen\SF_%today%\dxdiag.txt
echo Dxdiag file created under the name of "dxdiag.txt" at %USERPROFILE%\Desktop
:: Open the newly created file.
%USERPROFILE%\Desktop\dxdiag.txt
exit
:Dxdiag_Not_Found
echo Dxdiag.exe was not found. Please contact support for further help.
pause
exit
Everything worked good untill i added the variable : today
Code: Select all
echo off
set today=%date:~7,2%-%date:~4,2%-%date:~10,4%
echo %today%
%systemroot%\system32\dxdiag.exe /t %USERPROFILE%\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue
Screen\SF_%today%\dxdiag.txt
What i need is to create the dxdiag.txt file in this directory :
C:\Users\bout0_000\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\SF_24-07-13
The problem is that sometimes the directory SF_24-07-13 will be change .
For example tommorow the directory will be :
C:\Users\bout0_000\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\SF_25-07-13
Thats why i added the: today variable .
But when im running the bat file i cant find the dxdiag.txt file in this directory.
Before it was just :
%USERPROFILE%\Desktop
And i saw the file in the Desktop directory but now after the changes i did i cantsee the file its not created in the directory i wanted .
What did i do wrong ?