Hi guys,
Im having problem to open and print in notepad using batch command
if i using variable
the scenario is
My first batch is runnig which is..
"for %%x in ("c:\temp\A\"*.txt) do start /wait notepad /P %%x"
comment---it will print all the textfile inside the A folder..fine--
but my second batch is not running which is
for /f "eol=; tokens=1,2,* delims=," %%i in (runnning.csv) do start /wait notepad /P c:\temp\%%i\*.txt
comment-- i want to make folder A as a variable .the batch can read the variable but failed to open and print any textfile inside the folder (which is i variable)..
Any ideas guys .i'm running out of idea..
dos variable
Moderator: DosItHelp
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
It's a little hard to understand what you want, but I think if:
is working for you, then you should be able to do it again for the 2nd part like this:
Code: Select all
"for %%x in ("c:\temp\A\"*.txt) do start /wait notepad /P %%x"
is working for you, then you should be able to do it again for the 2nd part like this:
Code: Select all
for /f "eol=; tokens=1,2,* delims=," %%i in (runnning.csv) do (
for %%m in ("c:\temp\%%i\*.txt") do start /wait notepad /P %%m
)