Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

little batch file help pls

Featured Replies

Hi there,

I would like a little bit of help putting together a smarter batch file that i can reuse...

Currently i am basically doing this on my application CD's

cd dir1\

start /wait doIT.exe (do it my custom installer that i have put together for each of my applications to silently install and configure. i.e. add reg settings etc.)

cd ..

cd dir2\

start /wait doIT.exe

cd ..

cd dir3\

start /wait doIT.exe

and so on...

I thought it would be good/cleaner to do something like

for %%i in (dir) do if exist %%i\doIT.exe

the code to run...

I know the code above is not correct - but this will give you the idea of what i am seeking... i would appreciate any help/advice you can offer....


Try something like this

for /f "delims=" %%? in ('dir/b/s/a-d "doIT.exe" ^2^>nul') do if errorlevel 0 start "" /w "%%~f?"

or

for /r %%? in ('dir/b/a-d "doIT.exe" ^2^>nul') do if errorlevel 0 start "" /w "%%~f?"

Edited by Yzöwl

  • Author
Try something like this

for /f "delims=" %%? in ('dir/b/s/a-d "doIT.exe" ^2^>nul') do if errorlevel 0 start "" /w "%%~f?"

or

for /r %%? in ('dir/b/s/a-d "doIT.exe" ^2^>nul') do if errorlevel 0 start "" /w "%%~f?"

No joy :( but thankyou for your suggestions... :thumbup

Try this

for /d %%a in (*) do if exist %%a\Doit.exe start /wait %%a\doit.exe

in each of the examples I gave, you would of course need to be at least in the root of the CD

e.g.

@echo off&setlocal enableextensions
for /f "usebackq skip=1" %%? in (`wmic cdrom where "MediaLoaded='TRUE'" get drive ^2^>nul`) do if errorlevel 0 set CDROM=%%?
if not defined CDROM endlocal&goto :eof
pushd %CDROM%
for /f "delims=" %%? in ('dir/b/s/a-d "doIT.exe" ^2^>nul') do if errorlevel 0 call :RunIt "%%~f?"
popd&endlocal&goto :eof
:RunIt
start "" /w %1
goto :eof

another method too

for /f "delims=" %%? in ('dir/b/ad') do (
if exist "%%?\doIT.exe" (
pushd %%?
start "" /w doIT.exe
popd
)
)

Edited by Yzöwl

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.