COPY command does not work as expected

Bug #272921 reported by goto on 2008-09-21
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wine
Confirmed
Wishlist
wine (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: wine

In Windows, the COPY command run in a command prompt allows users to concatenate files by using a plus ("+") operator, for example:

copy file1+file2 outfile

In wine's cmd.exe, it seems to read file1+file2 as a single path and therefore outputs a "Path Not Found". Also, it does not recognize the "con" keyword used to represent stdout/stdin. Therefore another method of concatenating files:

copy file1 outfile
copy file2 con >> outfile

does not work either.

My Ubuntu version is 8.04, AMD64 architecture, though I have seen the same issue on the x86 version as well.

"apt-cache policy wine" yields:

wine:
  Installed: 1.0.0-1ubuntu4~hardy1
  Candidate: 1.0.0-1ubuntu4~hardy1
  Version table:
 *** 1.0.0-1ubuntu4~hardy1 0
        500 http://us.archive.ubuntu.com hardy-updates/universe Packages
        100 /var/lib/dpkg/status
     0.9.59-0ubuntu4 0
        500 http://us.archive.ubuntu.com hardy/universe Packages

Marcus Asshauer (mcas) wrote :

Thank you for reporting this bug. Please add your ubuntu version and the output of "apt-cache policy wine".

Changed in wine:
status: New → Incomplete
goto (gotolaunchpad) on 2008-09-22
description: updated
goto (gotolaunchpad) wrote :

I believe this description is now complete. If it needs anything else, please let me know and I will provide it.

From Launchpad: https://bugs.edge.launchpad.net/ubuntu/+source/wine/+bug/272921

In Windows, the COPY command run in a command prompt allows users to concatenate files by using a plus ("+") operator, for example:

copy file1+file2 outfile

In wine's cmd.exe, it seems to read file1+file2 as a single path and therefore outputs a "Path Not Found". Also, it does not recognize the "con" keyword used to represent stdout/stdin. Therefore another method of concatenating files:

copy file1 outfile
copy file2 con >> outfile

does not work either.

My Ubuntu version is 8.04, AMD64 architecture, though I have seen the same issue on the x86 version as well.

goto (gotolaunchpad) wrote :

This still seems to be a bug, even in 8.10. Is there any reason it is not being addressed?

Scott Ritchie (scottritchie) wrote :

Filed upstream.

Changed in wine:
importance: Undecided → Low
status: Incomplete → Triaged
Changed in wine:
status: Unknown → Confirmed
goto (gotolaunchpad) wrote :

Thank you.

Is this still an issue in current (1.1.22 or newer) wine?

(In reply to comment #1)
> Is this still an issue in current (1.1.22 or newer) wine?

Yes, it is. I am working on it.

(In reply to comment #2)
> (In reply to comment #1)
> > Is this still an issue in current (1.1.22 or newer) wine?
>
> Yes, it is. I am working on it.

And still present in wine v1.1.30.

also this will not work

H:\test> copy /b infile1.bin + infile2.bin + infile3.bin outfile.bin

Same like the first example but with spaces arount the '+' and binary concatenation.

The resultfile is only the first file 'infile1.bin' wrongly named '+' (The filename is the plus sign). See this example:

---<example>---
see Attachment
---</example>---

Created an attachment (id=23900)
Example of a 'copy /b' failure

As I wrote in my comment here is an example of the 'copy /b' failure which ist related with the wrong/missing(?) interpretation of the 'plus sign' in cmd.exe.

Does this occur in newest WINE?

Thank you for posting this bug.

Does this issue occur in newest WINE?

Changed in wine (Ubuntu):
status: Triaged → Incomplete
C de-Avillez (hggdh2) wrote :

@rusivi: the bug has already been opened and accepted upstream, there is no need to ask if it still happens.

Changed in wine (Ubuntu):
status: Incomplete → Triaged
Changed in wine:
importance: Unknown → Wishlist

C de-Avillez, thank you very much for contributing to this post. I did notice the upstream bug. As we and Launchpad are two sides of the same coin, we all flip together and both the reporter and us have a responsibility to work this out. As you noticed, the last upstream post since mine was 2009, and the last one on this post 2008. A polite inquiry to the reporter after ~2 years of no posting is not something to ridicule over ;) The next step for this bug is to use Scott Ritchie's 1.3.2 PPA found athttps://launchpad.net/~ubuntu-wine/+archive/ppa and test it for functionality.

This bug has not been updated for three years and OP by four. Is this still an issue i current (1.5.4) or newer wine ? You may also close this as abandoned if you feel that that this is issue is no longer relevant to you.

Still present in wine 1.5.7.

In , Doe (doe) wrote :

(In reply to comment #7)
> Still present in wine 1.5.7.

and also in Wine 1.5.12.

Seriously, this bug stops people from working with existing DOS batch scripts that make extensive use of this feature to append files. Though Wine works great for most applications, BAT scripting support is a very basic functionality that I don't see as a wishlist feature, but essential.

In , 4s (4s) wrote :

Support for copy with + or * providing concatentation is covered under bugs 26943 and 27899, which I have just sent in a patchset for, so renaming this bug to the residual problem of support for CON (and CON:) and is similar to 21394 which reports the same issue using NUL (and NUL:)

In , 4s (4s) wrote :

First patch is committed, problems with second patch.

In , 4s (4s) wrote :

The last patch in the series was wrong, and Eric submitted a few attempts to fix this in the console code in December 2012. The most recent set is here:
http://www.winehq.org/pipermail/wine-patches/2012-December/121090.html
This had a problem due to a hanging process
(AJ) http://www.winehq.org/pipermail/wine-devel/2013-January/098395.html
(Eric) http://www.winehq.org/pipermail/wine-devel/2013-January/098425.html

Eric sent in a patch for the hanging process:
http://www.winehq.org/pipermail/wine-patches/2013-January/121501.html
which was committed
http://www.winehq.org/pipermail/wine-cvs/2013-January/093158.html

However the main patchset was not - maybe it just needed resending.

Eric - Do you know what happened here, was it simply a case of not resending it after the extra fix was submitted?

For reference, as far as I know / from testing that patch set, the windows cmd.exe will work fine in the 'copy con filename' mode once this patchset is applied.

Yuan Chao (yuanchao) wrote :

I can confirm the same issue still exist on wine 1.4 on Ubuntu 12.04.5 LST. This causes utau external program file processing failures as the result wav files need to be combined with "copy /b".

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.