Search found 141 matches

by nnnmmm
03 Oct 2024 20:43
Forum: DOS Batch Forum
Topic: how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?
Replies: 6
Views: 12495

Re: how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?

>>change the empty lines with the ALT+08 char (BackSpace) i cant use ALT+08 as the end of line marker, because i am already using "-" as a marker for a temporary improvisation, "-" is easier than ALT+08 thanks for trying to help it seems no-go, i will adapt using "-" i will close this issue, i may a...
by nnnmmm
03 Oct 2024 00:57
Forum: DOS Batch Forum
Topic: how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?
Replies: 6
Views: 12495

Re: how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?

i need to put corrected line numbers and control its contents, i left them out to show my problem at the moment i need empty lines to group them in a way these will be added later SET /A CC=!CC!+1 IF !CC! GEQ 1 IF !CC! LEQ 9 SET DD= !CC! IF !CC! GTR 9 SET DD=!CC! IF /I "!VV:~0,10!"=="http://www" (SE...
by nnnmmm
02 Oct 2024 22:05
Forum: DOS Batch Forum
Topic: need some corrections of processing a batch for "!" for DelayedExpansion
Replies: 0
Views: 7685

need some corrections of processing a batch for "!" for DelayedExpansion

if a website has a symbol "!" in it, this batch does not work on that website selection possible to correct the code? F9-WEBSITE.TXT has http://www.dynamoo.com/technical/ebcdic.htm - https://www.dnsstuff.com/ http://www.ztw3.com/forum/forum.php http://truebasic.com/forum - ftp://ftp.mcafee.com/pub/a...
by nnnmmm
02 Oct 2024 20:53
Forum: DOS Batch Forum
Topic: how do you rename a file or a dir or a string name to be lowered?
Replies: 3
Views: 18013

Re: how do you rename a file or a dir or a string name to be lowered?

my previous posted "Context Menu - DO lowercase - Dir.bat" turned out to be incorrect Context Menu - DO lowercase - Dir.bat. this is the correct one @ECHO OFF SET "str1=%~dp1" SET "str2=%~dpn1" ECHO "%str1%" ECHO "%str2%" ECHO "%str2:~-3%" IF /I "%str2%"=="%str2:~-3%" GOTO :END FOR /F "Tokens=*" %%V...
by nnnmmm
02 Oct 2024 20:26
Forum: DOS Batch Forum
Topic: getting a filesize doesnt work without * in it, wish to know why
Replies: 3
Views: 19230

Re: getting a filesize doesnt work without * in it, wish to know why

AA= REM FOR /R "%C1%" %%V IN (%FNAME1%*) DO (SET /A FSIZE1=%%~zV) BB= FOR %%V IN ("%C1%\%FNAME1%") DO (SET /A FSIZE1=%%~zV) i replaced AA= with BB= i have a tendency to stick with one structure that worked no matter how bad it was. because i dont know much about DOS commands and operators even after...
by nnnmmm
02 Oct 2024 19:58
Forum: DOS Batch Forum
Topic: how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?
Replies: 6
Views: 12495

how do i display empty lines with maybe DELIMS and TOKENS for TYPE command?

F9.TXT has 1 2 3 5 7 8 ------------------------------------------------------------- SET K1=F9.TXT REM these two lines just below are not from me, you may ignore them, cause i dont understand ^ well For /F tokens^=*^ delims^=^ eol^= %%I in ('TYPE "%K1%"') do echo. %%I For /F tokens^=*^ delims^=^ eol...
by nnnmmm
29 Sep 2024 12:44
Forum: DOS Batch Forum
Topic: getting a filesize doesnt work without * in it, wish to know why
Replies: 3
Views: 19230

getting a filesize doesnt work without * in it, wish to know why

@ECHO OFF SET DSPEC=C:\ZTREE SET FNAME=ZTW.HST REM FOR /R "%DSPEC%" %%V IN ( ZTW*.HST ) DO ( FOR /R "%DSPEC%" %%V IN ( "%FNAME%*" ) DO ( SET /A FSIZE=%%~zV rem SET FSIZE=%%~zV rem ECHO %%~zV ) IF %FSIZE% LSS 5000 ECHO %FNAME% SIZE IS LSS THAN 5000 IF %FSIZE% GTR 5000 ECHO %FNAME% SIZE IS GTR THAN 5...
by nnnmmm
25 Sep 2024 22:15
Forum: DOS Batch Forum
Topic: how do you rename a file or a dir or a string name to be lowered?
Replies: 3
Views: 18013

Re: how do you rename a file or a dir or a string name to be lowered?

>Yes. The on screen help on REN command clearly specify: thanks i understood many parts of it i got the two solutions out of three ------------------------------------------------------- Context Menu - DO lowercase - Dir.bat has @ECHO OFF SET Rename_string2lowercase="%~dp1" FOR /F "Tokens=*" %%V in ...
by nnnmmm
25 Sep 2024 00:12
Forum: DOS Batch Forum
Topic: how do you rename a file or a dir or a string name to be lowered?
Replies: 3
Views: 18013

how do you rename a file or a dir or a string name to be lowered?

https://mega.nz/file/HcgTVDbY#pkPHdT5Vtv2kCLq260P4_LL9Nc6T7Kk9dQOsPAm2_eY i made a context menu entry "DO lower case" if i RIGHT-click on a LNK file name or a LNK dir name or an explorer's file name or an explorer's dir name, you can also get an entry "DO lower case" included in as a possible choic...
by nnnmmm
09 Aug 2024 19:58
Forum: DOS Batch Forum
Topic: string manipulation, display a whole line or cut and display the part
Replies: 3
Views: 20506

Re: string manipulation, display a whole line or cut and display the part

thanks it worked greatly i made a mistake saying, i meant displaying 75 characters from the position 30 is there a way to make 69 as a variable manipulation without introducing a new variable? SET /A DS1=30 SET /A DS2=75 from if "!VV:~0,69!"=="!VV!" ( to some kind of if "!VV:~0,%DS2%-1!"=="!VV!" ( %...
by nnnmmm
09 Aug 2024 05:19
Forum: DOS Batch Forum
Topic: string manipulation, display a whole line or cut and display the part
Replies: 3
Views: 20506

string manipulation, display a whole line or cut and display the part

@ECHO OFF SET K1=M:\REGISTRY.TXT SET DS1=30 SET DS2=75 REM ********************************************************************* SetLocal EnableExtensions EnableDelayedExpansion REM ------------------------------------------------------------- ECHO %K1% ECHO. SET CC=0 FOR /F "DELIMS=" %%V IN ('TYPE...
by nnnmmm
05 Jul 2024 05:53
Forum: DOS Batch Forum
Topic: is there a way to use ECHO <esc>[32;40m without adding an extra line?
Replies: 4
Views: 24338

Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?

<nul Set /P "=[32;40m" was so good, thanks how can <nul make the prompt disappear? nul i know makes an imaginary file you dump things into it without causing anything a reason i need [32;40m instead of color 0A was i have two types of 100s batch files one goes with" Press any other key to CONTINUE" ...
by nnnmmm
05 Jul 2024 03:04
Forum: DOS Batch Forum
Topic: is there a way to use ECHO <esc>[32;40m without adding an extra line?
Replies: 4
Views: 24338

is there a way to use ECHO <esc>[32;40m without adding an extra line?

ECHO [32;40m================= ECHO Quake 4 - selector ECHO ================= the line is offset, it is hard to read and compare the batch lines between up and down ---------------------------------------------- ECHO [32;40m ECHO ================= ECHO Quake 4 - selector ECHO ================= this i...
by nnnmmm
06 May 2024 20:46
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47073

Re: pushd popd depend on batch filenames with which they run... why?

%~0\.. if crysis2.bat\.. = crysis2.bat\c:\ABC i will take crysis2.bat\c:\ABC as c:\ABC\crysis2.bat >However, because %0 might be a location relative to the initial location from which you started the batch file, that string might not contain a valid path for any other location. i run batches from zt...
by nnnmmm
02 May 2024 01:01
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47073

Re: pushd popd depend on batch filenames with which they run... why?

pushd "%~0\.." set "batch.dir=%cd%" cd.. %0 gives you crysis2.bat %~0 gives you without quotes what is \.. for? what does crysis2.bat\.. stand for? what does it mean by cd.. and not by CD .. ? i got it the simplest form after staring at your code for long, now i am like ....what couldnt i think of t...