One of the less-known but often used in batch files features of COPY is the ability to substitute names and extensions.
This allows us to do
copy .bat .bak
to make a backup of all batch files, or
copy database. dbcopy.
to make a copy of all the database files.
Alas, dosbox doesn't implement this feature and this breaks some scripts. Attached patch implements it cleanly and solves the problem.
(It is against the 0.72, but I hope it isn't much of a problem.)
Logged In: YES
user_id=534153
Originator: YES
One extra feature: allows for parts of filename substitution, such as
This allows copy to be used in place of xcopy in many scripts.
File Added: dosbox-0.72-copy-subst-better.diff
dosbox-0.72-copy-subst-better.diff
testcopy.bat
Logged In: YES
user_id=534153
Originator: YES
Also attaching a test script.
(Coverage not measured, but I hope it covers all the cases.)
File Added: testcopy.bat