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 02,2017 at 03: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

993 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 81 users online (1 registered, 80 guests)
Index | Admin contact |   Forum Time: Mar 29, 2024 - 1:49 pm UTC  |  Hits:62,408,012  (22,798 Today )
RSS Feed