VOGONS


for loop

Topic actions

First post, by Guest

User metadata

I'm having trouble getting a batch file to work under DOSBox. It
dies at a 'for' loop. The batch file works fine under old DOS.

The same batch file has a problem with a copy command. The
command has a /y option, which says to overwrite an existing file
without prompting the user. Old DOS works fine, DOSBox says I
have an invalid parameter.

Any help?
Thanks
-jeff

<Disclaimer - I searched the forum first before asking these, sorry
if they've been answered and I wasn't able to fine the answer.>

Reply 1 of 3, by Markus

User metadata
Rank Newbie
Rank
Newbie

1. So what's inside the loop?
2. Use copy without /y, dosbox won't ask you anyway, if it should overwrite a file.

Reply 2 of 3, by Guest

User metadata

The line reads:

for %%x in (*.zip) do echo %%x

which gives me a simple file listing. Sure, I can program
around it, (and, in fact I have) but it means I have two versions
of my batch file, one for old Dos, on for DOSBox.

Reply 3 of 3, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

for ain't supported by the dosbox shell, so either hope someone will add it or use some other shell like 4dos/ndos in shell.