ZTree.com  | ZEN  | About...  

 Index   Back

i figured this out with EDIT.BAT in Co1A, seems like a wonderful day again   [ZEP]

By: Ryan       
Date: Sep 01,2017 at 23:15
In Response to: i probably mislead you, my wish was how to not to edit certain files (Ryan)

A editor: c:\EDIT.BAT in Co1A

@echo off
SET P1=C:\WINDOWS\NOTEPAD.EXE
SET P2=C:\Programs\IrfanView\i_view32.exe
SetLocal EnableExtensions EnableDelayedExpansion

FOR /F %%V IN ('ECHO %1 ^|FIND /I /C ".BAT"') DO (SET K1=%%V
IF !K1!==1 %P1% %1
)

FOR /F %%V IN ('ECHO %1 ^|FIND /I /C ".TXT"') DO (SET K1=%%V
IF !K1!==1 %P1% %1
)

FOR /F %%V IN ('ECHO %1 ^|FIND /I /C ".BMP"') DO (SET K1=%%V
IF !K1!==1 %P2% %1
)
.
.
.
.

i need to replace "|" and "Find" with something faster, pipe and find commands are known to be too slow.

a batch master could help me out on the fastest working bacth to avoid certain strings for my EDIT.BAT

i dont really need bmp mp3..etc to work and link here, except if i really want to edit pictures and etc --> this will goes to my EDIT1.BAT

307 views      
Thread locked
 

Messages in this Thread

 
94,424 Postings in 11,918 Threads, 348 registered users, 5 users online (0 registered, 5 guests)
Index | Admin contact |   Forum Time: Sep 16, 2019 - 8:04 am EDT  |  Hits:28,642,908  (581 Today )
RSS Feed