Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

help by batch programming

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Oggi

Oggi

    Newbie

  • Member
  • 16 posts
  • Joined 22-February 04
hello,

i have the following problem.

i have many xp update packages in a folder.

now i have a batchfile which looks like so:

start.bat
cls
@echo off

set param=%1
echo start...
start /wait %param%
echo fertig

now i want a batch file which get all files of the directory(xp-updates) and then he should start the batch like:

start.bat filename

do you now what i mean ? i will read all the filenames of a directory and send it to the batchfile which excute the file.

can someone make a little batchfile for me please ?

thanks.

mfg
Oggi :)


How to remove advertisement from MSFN

#2
mdes

mdes

    Advanced Member

  • Member
  • PipPipPip
  • 343 posts
  • Joined 07-November 03
Use the DOS command FOR :) It's very powerfull (FOR/?)
Windows XP Pro French + SP2 Many Thanks to GreenMachine XPCREATE
Michel Dessaintes (nick: mdes) FlashList for genealogy, CongésRFV for Pocket PC

#3
Oggi

Oggi

    Newbie

  • Member
  • 16 posts
  • Joined 22-February 04
hmm its very hardly hmm

can you make me a simple code please ?

mfg
Oggi

#4
mdes

mdes

    Advanced Member

  • Member
  • PipPipPip
  • 343 posts
  • Joined 07-November 03
Put the following code in a .BAT or .CMD file (.BAT=.CMD):
@ECHO OFF

FOR %%I IN (*.EXE) DO (

    ECHO Starting %%I

    START /WAIT %%I

    ECHO fertig

)

Windows XP Pro French + SP2 Many Thanks to GreenMachine XPCREATE
Michel Dessaintes (nick: mdes) FlashList for genealogy, CongésRFV for Pocket PC




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users