Start of all files from a folder in turn.

February 11, 2010 at 08:16:56
Specs: Windows XP, E6850, 2 Gb.
I need batch, which starts a command oftentimes in succession:
load.bat -load D:\install\xyz.xyz -u login -p password
and each time, in place of xyz.xyz - inserts the file name and expansion file from the folder of D:\install\.

For example, not to write a few dozens (hundreds) of one times
load.ovpl -load D:\install\smi.my -u user -p password
load.ovpl -load D:\install\iucbnkv.mv -u user -p password
...
...
...
load.ovpl -load D:\install\tc.mc -u user -p password

and to execute
load.ovpl -load D:\install\*.* -u user -p password

where *.* file from the folder of D:\install (there are there many files, names/extensions different and must beat all are started).

P.S.: sorry to bad English


See More: Start of all files from a folder in turn.

Report •


#1
February 11, 2010 at 09:12:22
maybe:

for /f "tokens=*" %%a in ('dir /b /a-d d:\install') do (
echo loading %%a...
load.ovpl -load D:\install\%%a -u user -p password
)


Report •

#2
February 11, 2010 at 14:39:30
May need :

load.ovpl -load "D:\install\%%a" -u user -p password

Depends on whitespace files in D:\install ... or not.


Report •

#3
February 11, 2010 at 21:47:48
I've been working with "new" (lfn) windows for about 10 years now, and i still can NOT remember to accomodate those friggin spaces in filenames/paths. I guess I'm just an old dog who can't learn, Darwin's law will take me down!
("adapt or fail") On the other hand, the same law applies to IBM, MS, Apple/Mac, Sun, ... That's the beauty of the stock market.

Report •

Related Solutions

#4
February 12, 2010 at 02:54:10
"I've been working with "new" (lfn) windows for about 10 years now, and i still can NOT remember to accomodate those friggin spaces "

I'm glad it ain't just me.

The first time I did a dir on a w95 box and saw Progra~1 I knew there was a few miles of bad road ahead.


=====================================
Helping others achieve escape felicity

M2


Report •

#5
February 12, 2010 at 03:03:08
Indeed ... Darwin is always there when you dont expect. One way of solving the issue, is to ALWAYS use double quotes, but even I don't do that (cause I am lazy). In theory, this is the only good solution.

Report •


Ask Question