VOGONS


First post, by Akuma

User metadata
Rank Newbie
Rank
Newbie

Can anyone confirm/reproduces this ?

I wanted to copy a file in dosbox, instead of pressing shift I hit the enter key resulting in a malformed command.
This should result in a syntax error but it does not: (it destroys the file in the process)

C:\>copy UNP412B.EXE
UNP412B.EXE
1 File(s) copied.
C::\>dir UNP412B.EXE
Directory of C:\.
UNP412B EXE 0 06-08-2019 11:30
1 Files(s) 0 Bytes.
0 Dir(s) 262,111,744 Bytes free.
C:\>

Dosbox Version: 0.74-4.3 (compiled with heavy debug enabled)

'copy' command overwrites original

Reply 1 of 4, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

Not a malformed command.

In copy, the origin is required, but destination is not required. If an user omits destination, the files are copied to current directory.

(I'm not sure if it warned about existing files)

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 2 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's a known issue with the COPY command. Real DOS would stop you with a "File cannot be copied onto itself" error message. Can be worse if you do a COPY *.* command, which truncates all files in the current directory to zero bytes. Anyway, for the time being, just don't do it. 😉

Reply 3 of 4, by Akuma

User metadata
Rank Newbie
Rank
Newbie

@zup
And there I thought I found a bug, I should know better by now. Thanks.

@ripsaw:
I don't think my pinky would trip over the shift and hit the [8][SHIFT][.][8][SHIFT] key. But I moved my beverage to the other side 😉

Reply 4 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well, just as you mistakenly left out a destination when copying a single file, it's possible to do the same when copying multiple files, so just be careful, and also don't use DOSBox to do file management on irreplaceable files. 😀