windows - I am trying to change string using batch but getting some error -


below code using not getting result not getting desired result error

set "oldstra=abc eft" set newstra=!newstr1!   set "outputa= %%a in (%newstr1a::=;%) set outputa=!outputa!%%a- rem eliminate last dash: set outputa=%outputa:~0,-1% echo outputa: "%outputa%"     pause;  %%f in (c:\users\rawal\desktop\movie\"!newstr1!"\*.*) ( call modfile %%~dpnxf oldstra newstra   ) 

i getting error

c:\users\rawal\desktop\movie>(call modfile %~dpnxf oldstra newstra ) following usage of path operator in batch-parameter substitution invalid: %~dpnxf oldstra newstra  valid formats type call /? or /? 

i'm pretty sure code have posted should not (cannot) give error. posted code complete code? or have eliminated thought irrelevent lines?

if following line executed outside of loop, generate error:

call modfile %%~dpnxf oldstra newstra 

my guess actual code has additional line contains ) closing loop prematurly.

whatever cause, causing call line outside context of loop.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -