Search found 184 matches

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: 10800

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: 10800

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: 2752

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: 11513

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: 10800

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: 10800

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: 10209

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: 10111

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: 10111

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: 10111

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: 10845

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: 10209

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
by nnnmmm
03 Sep 2017 18:07
Forum: DOS Batch Forum
Topic: finding the files that have two strings matched?
Replies: 11
Views: 10209

Re: finding the files that have two strings matched?

AA= SET FSPEC="*%FS1%*%FS2%*.*" "*%FS2%*%FS1%*.*" TYPE NUL > %ZLS% SET CC=0 FOR %%U IN (%DRSPEC%) DO ( IF EXIST "%%U:\" ( ECHO %%U: PUSHD "%%U:\" CMD /Q /U /C ( FOR /F "DELIMS=" %%V IN ('DIR %FSPEC% /A-D /B /S') DO ( ECHO T="%%V">>%ZLS% SE...
by nnnmmm
03 Sep 2017 08:18
Forum: DOS Batch Forum
Topic: %~f1 %~f1 %~p1 %~n1 variable fixing and slightly redefining to sync with other soft.
Replies: 9
Views: 10845

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

Code: Select all

for %%a in ("%FFF3%") do set "FFF6=%%~nxa"


I think i know what you did
%~nxI says that just a filename and its extension in FOR /?
you used the last dir name as a filename, i wouldnt guess this easily