Search found 66 matches

by nnnmmm
06 Sep 2017 00:47
Forum: DOS Batch Forum
Topic: Automated setup of DOS command window
Replies: 39
Views: 14352

Re: Automated setup of DOS command window

>Because I open up other DOS windows in my BAT files, using START. When you do this it knows nothing about your default icon on the desktop and its defaults. So it gives you the Windows default, the dinky 80/300/80/25 with 8x12 Raster font. this is exactly the same thing that happens in my win 8.1,...
by nnnmmm
05 Sep 2017 17:59
Forum: DOS Batch Forum
Topic: string that is related with delims=, i need right strings
Replies: 12
Views: 2420

Re: string that is related with delims=, i need right strings

Code: Select all

%PIVOT% in FOR %%U IN ("!INP:%PIVOT%=" "!") DO SET "ANS=%%~U" 

interferes with Setlocal EnableDelayedExpansion
by nnnmmm
05 Sep 2017 17:48
Forum: DOS Batch Forum
Topic: renaming a file from A - B.MP3 to B - A.MP3
Replies: 9
Views: 2275

Re: renaming a file from A - B.MP3 to B - A.MP3

barnabe0057, it worked.
so far, i found 1 minor problem,
delims may be " - " and not "-", this would fix

Code: Select all

abc - 123.mp3 becoming
 123-abc .mp3
by nnnmmm
05 Sep 2017 06:40
Forum: DOS Batch Forum
Topic: renaming a file from A - B.MP3 to B - A.MP3
Replies: 9
Views: 2275

Re: renaming a file from A - B.MP3 to B - A.MP3

@echo OFF setlocal set "process=echo ren" rem set process=ren set "Folder=m:\mmtest" set "Files=*.mp3" set "Recursive=1" rem Setting Delim set "Delim= - " rem this is a temporary Folder for Sorting and renaming only set "tempFolder=m:\zzz1"...
by nnnmmm
05 Sep 2017 03:35
Forum: DOS Batch Forum
Topic: left trim a string with "!"?
Replies: 1
Views: 653

left trim a string with "!"?

LIB-STRING1.BAT is CALL :%1 %* EXIT /B :LTRIM (@ECHO OFF SetLocal EnableExtensions EnableDelayedExpansion SET "STRING=!%~2%! FOR /F "TOKENS=* DELIMS= " %%A IN ("!STRING!") DO SET "STRING=%%A" ) (Endlocal IF "%~2" NEQ "" SET "%~2=%STRING%&qu...
by nnnmmm
05 Sep 2017 01:48
Forum: DOS Batch Forum
Topic: string that is related with delims=, i need right strings
Replies: 12
Views: 2420

Re: string that is related with delims=, i need right strings

@ECHO OFF SETLOCAL SET IN1=1/2 3/4/5S D6 7890 SET IN1=1234567890 SET IN2=5 CALL "LIB-STRING1.BAT" GET_STR_PIVOT_TO_END1 IN1 IN2 ANS ECHO %IN1% %ANS% PAUSE i am stuck here, why am i not getting the answer "67890" LIB-STRING1.BAT has CALL :%1 %* EXIT /B :GET_STR_PIVOT_TO_END1 (@EC...
by nnnmmm
05 Sep 2017 01:32
Forum: DOS Batch Forum
Topic: renaming a file from A - B.MP3 to B - A.MP3
Replies: 9
Views: 2275

Re: renaming a file from A - B.MP3 to B - A.MP3

yes, hope that it can do with space, comma, &, !, ' !abc - simon & garfield.mp3 simon & garfield - !abc.mp3 gets tough, tough gets going - billy.mp3 billy - gets tough, tough gets going.mp3 sir, i can dance '99 - baccara.mp3 baccara - sir, i can dance '99.mp3 i want to reposition mp3 nam...
by nnnmmm
04 Sep 2017 21:30
Forum: DOS Batch Forum
Topic: renaming a file from A - B.MP3 to B - A.MP3
Replies: 9
Views: 2275

renaming a file from A - B.MP3 to B - A.MP3

Code: Select all

suppose a file name has these chars besides the alphabet !ab & , ( ' cd - 12 ! & , '34.mp3
and i want to rename a file as  12 ! & , '34 - !ab & , ( ' cd.mp3
there is only one " - " in each file.


simply saying, from A - B.MP3 to B - A.MP3
how can i do it?
by nnnmmm
04 Sep 2017 19:25
Forum: DOS Batch Forum
Topic: finding the files that have two strings matched?
Replies: 11
Views: 2222

Re: finding the files that have two strings matched?

AA= FOR /F "DELIMS=" %%V IN ('DIR %FSPEC% /A-D /B /S') DO ( CMD /Q /U /C ECHO T="%%V">>%ZLS% SET /A CC+=1 ) BB= CMD /Q /U /C "FOR /F "DELIMS=" %%V IN ('DIR %FSPEC% /A-D /B /S') DO ECHO T="%%V">>%ZLS%" FOR /F %%D IN ('TYPE %ZLS% ^| FIND ":"...
by nnnmmm
04 Sep 2017 08:29
Forum: DOS Batch Forum
Topic: looking for a fastest running batch that looks for certain file extensions or vice versa
Replies: 11
Views: 2239

Re: looking for a fastest running batch that looks for certain file extensions or vice versa

AA= 2>nul CALL :z%~x1 "%~1" || ECHO KEINE AUSWAHL VORHANDEN! EXIT /B :z.TXT :z.BAT :%P1% %1 EXIT /B BB= 2>nul CALL :z%~x1 "%~1" || ECHO KEINE AUSWAHL VORHANDEN! EXIT /B :z.TXT %P1% %1 EXIT /B :z.BAT %P1% %1 EXIT /B lastly, you call AA= labeling, if %P1% %1 is the same, correct? t...
by nnnmmm
03 Sep 2017 23:17
Forum: DOS Batch Forum
Topic: looking for a fastest running batch that looks for certain file extensions or vice versa
Replies: 11
Views: 2239

Re: looking for a fastest running batch that looks for certain file extensions or vice versa

>Your given code says open ".BMP" files using IrfanView, but your Text says the batch file should " abort and take no action go to :EOF", is that what it said in ZZ=? i didnt know, i meant if the code finds the "BAT" string then... just run the program as quickly as pos...
by nnnmmm
03 Sep 2017 23:05
Forum: DOS Batch Forum
Topic: looking for a fastest running batch that looks for certain file extensions or vice versa
Replies: 11
Views: 2239

Re: looking for a fastest running batch that looks for certain file extensions or vice versa

>If you want to support the special case "no extension", you might add an additional character is there a way to add something for "no extesnion" in AA= without IF /I "%~x1"=="" %P1% "%~1"? i tried :. it didnt work. does :.TXT execute faster than :.I...
by nnnmmm
03 Sep 2017 21:26
Forum: DOS Batch Forum
Topic: %~f1 %~f1 %~p1 %~n1 variable fixing and slightly redefining to sync with other soft.
Replies: 9
Views: 2689

Re: %~f1 %~f1 %~p1 %~n1 variable fixing and slightly redefining to sync with other soft.

i didnt find what i was looking for in the guideline

how do i test if the input is a directory?

"M:\11 11\22 22\33 33" could also means a file name with no ext.

AA.BAT "M:\11 11\22 22\33 33"
by nnnmmm
03 Sep 2017 20:40
Forum: DOS Batch Forum
Topic: finding the files that have two strings matched?
Replies: 11
Views: 2222

Re: finding the files that have two strings matched?

Code: Select all

SET DRSPEC=C D E G H I J K L M N O P Q R S T U V W

SET FS1=TA
SET FS2=GO
SET ZLS=M:\11.TXT

SET FSPEC=*%FS1%*%FS2%*.*" "*%FS2%*%FS1%*.*

nothing really fancy, they were just straight variable claims

too wordy, so re-edited