Solved

I would like to run a print command on the files specified in *.txt file.

Hello,

I would like to run a print command on the files specified in *.txt file.

Command: "X:\path\application.exe /p"

File list in *txt file:
X:\folder1\folder2\document1.xcmd
X:\folder3\document2.xcmd
K:\folder7\document3.xcmd
ect...

I found something similar: for %%g in (*.xmcd) do "C:\path\mathcad.exe /p %%g


Thanks for the help in advance!
6 answers Last reply Best Answer
More about print command files file
  1. niku7 said:
    Hello,

    I would like to run a print command on the files specified in *.txt file.

    Command: "X:\path\application.exe /p"

    File list in *txt file:
    X:\folder1\folder2\document1.xcmd
    X:\folder3\document2.xcmd
    K:\folder7\document3.xcmd
    ect...

    I found something similar: for %%g in (*.xmcd) do "C:\path\mathcad.exe /p %%g


    Thanks for the help in advance!

    Pipe the file to lpt1
    copy filename > lpt1
  2. ksiemb said:
    Pipe the file to lpt1
    copy filename > lpt1


    That won't work. They aren't text files, they are .xcmd files (mathcad) files.
  3. Best answer
    This is the syntax for the for loop.

    http://ss64.com/nt/for_f.html
  4. Thanks all for the help. Solved
  5. Best answer selected by niku7.
  6. niku7 said:
    Best answer selected by niku7.

    nI would like to run a print command on the files specified in *.txt file.
    n
    nThey weren't text files !
Ask a new question

Read More

Command Prompt Windows 7