Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
175 views
in Technique[技术] by (71.8m points)

dos - Batch file to execute all files in a folder

I need a batch files the launches all files in a given folder (in this case it is c:macrosday).

I've tried the following, but it doesn't seem to do anything.

for /f %i in ('C:macrosDay /b') DO command %i
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This works from my command line:

for /F "usebackq" %%i in (`dir /b C:macrosDay`) DO %%i

as does this:

for %%i in (C:macrosDay*) do %%i

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...