execute folder content

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
samy23
Posts: 1
Joined: 02 Dec 2008 08:32

execute folder content

#1 Post by samy23 » 02 Dec 2008 08:38

Hi Everyone!
Nice forum...like the style :-))

Well, I am not a complete stranger do DOS, but I`m stuck on something that seems to superseed my abilties.

I`ve been trying to execute the contents of a folder via a .bat file. Whenever I name the content of the folder by its exact name, e.g. notepad.exe, it works.
BUT when I try to execute everything inside with help of a wildcard, it does not.

Does anybody have an idea of how to go about?

Thanks in advance

DosItHelp
Expert
Posts: 239
Joined: 18 Feb 2006 19:54

#2 Post by DosItHelp » 05 Dec 2008 01:50

samy23,

May be like this within a batch:

Code: Select all

for %%A in (*.exe *.bat *.com) do "%%A"

DosItHelp? :wink:

Post Reply