Search found 6 matches

by G.SYLVAIN
04 Nov 2018 20:31
Forum: DOS Batch Forum
Topic: I need to fix variable ?
Replies: 6
Views: 3913

Re: I need to fix variable ?

thank you very much, you solved my script ! :D
by G.SYLVAIN
04 Nov 2018 16:35
Forum: DOS Batch Forum
Topic: I need to fix variable ?
Replies: 6
Views: 3913

Re: I need to fix variable ?

you're right, but I do not know how to apply it. [0m, for ESC character for color in windows 10. at botom the script. I have 2 variables %USERNAME% And %DATE% on same line. I work whit COLS=84 :: :MENU :: SETLOCAL ENABLEDELAYEDEXPANSION CLS & COLOR 0F MODE CON: COLS=84 LINES=37 TITLE === WINDOWS_MAI...
by G.SYLVAIN
04 Nov 2018 13:59
Forum: DOS Batch Forum
Topic: I need to fix variable ?
Replies: 6
Views: 3913

Re: I need to fix variable ?

I undestand you say, but your variable you have set at the top never change.
How to calculate lent or referance like "10" characters, if %username% it <10 add pad or >10 remove pad ?
Because the username is never same in other account
by G.SYLVAIN
03 Nov 2018 20:07
Forum: DOS Batch Forum
Topic: I need to fix variable ?
Replies: 6
Views: 3913

I need to fix variable ?

I need to keep variable %_DATE% fixed. Bot the variable user %USERNAME% can be change in other computers. Keep aligned text. ... :: :MENU :: SETLOCAL ENABLEDELAYEDEXPANSION CLS & COLOR 0F MODE CON: COLS=84 LINES=37 TITLE === WINDOWS_MAINTENANCE_HELPER === :: CALL :FUNC_WINVER _WVER & REM FUNCTION TO...
by G.SYLVAIN
31 Oct 2018 07:59
Forum: DOS Batch Forum
Topic: I NEED THE PRECISE DATE FOR MY BATCH FILE
Replies: 4
Views: 3631

Re: I NEED THE PRECISE DATE FOR MY BATCH FILE

I solved the problem. I cleaned the code. Thanks to you @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION FOR /F %%I IN ('WMIC OS GET LOCALDATETIME /FORMAT:LIST ^| FIND "="') DO SET "%%I" SET "YYYY=%LOCALDATETIME:~0,4%" SET /A "MM=1%LOCALDATETIME:~4,2% - 100" SET "DD=%LOCALDATETIME:~6,2%" FOR /F %%D IN ('WM...
by G.SYLVAIN
30 Oct 2018 20:02
Forum: DOS Batch Forum
Topic: I NEED THE PRECISE DATE FOR MY BATCH FILE
Replies: 4
Views: 3631

I NEED THE PRECISE DATE FOR MY BATCH FILE

This batch file does not work for the days of the week. Could you help me ? Excuse me for my capital letters in the batch file. I find it more formal and visible @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION FOR /F %%I IN ('WMIC OS GET LOCALDATETIME /FORMAT:LIST ^| FIND "="') DO SET "%%I" SET "YYYY=%LOC...