0

I am used to using linux command line so a little unfamilar with windows dos. I am trying to add a copy file line into my script but it is not working. So I tried the same thing on the cmd promt and still its not working. So I did some tests, I found a way to make it work by going to the source folder and do copy * dest. However I want to do copy source\* dest but this seems to not work. Here is the output of my testing:

C:\Users\test\Desktop\audioTest\resources>copy * C:\Users\test\Desktop\build-TGW2AudioTest-Desktop_Qt_5_5_1_MinGW_32bit-Debug\targetDbg /y
data_input.txt
open-audio-doc.png
open-data-doc.png
PESQ.exe
ref_alastair.wav
ref_female.wav
ref_male.wav
        7 file(s) copied.

C:\Users\test\Desktop\audioTest\resources>copy C:\Users\test\Desktop\audioTest\resource\* C:\Users\test\Desktop\build-TGW2AudioTest-Desktop_Qt_5_5_1_MinGW_32bit-Debug\targetDbg /y
The system cannot find the path specified.

Why does the first one work, but the second one does not?

7
  • I cannot reproduce this in a cmd shell on Windows 7 64 bit.
    – DavidPostill
    Jan 11, 2016 at 9:27
  • @DavidPostill Yeah its weird, I thought maybe a permissions thing but both locations are in a folder on my desktop. But it says it can't find specified path.... I am actually calling it from this path so that is even more strange. Jan 11, 2016 at 9:32
  • 1
    not sure if this is a typo or not, but your folder is shown as being called 'resources' and the copy command is referring to a directory called resource, without the 's' in resources.
    – Richie086
    Jan 11, 2016 at 10:08
  • @Richie086 ...oh! Jan 11, 2016 at 12:48
  • Feeling a bit silly now... hey ho.... if you want to put it in an answer i'll fix you up with some points!... thanks : ) Jan 11, 2016 at 12:49

1 Answer 1

1

Try this

copy C:\Users\test\Desktop\audioTest\resources\* C:\Users\test\Desktop\build-TGW2AudioTest-Desktop_Qt_5_5_1_MinGW_32bit-Debug\targetDbg /y

The full path to your directory was

C:\Users\test\Desktop\audioTest\resources\

however your example left the "s" off of the name of the resources folder

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .