• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1465
  • Last Modified:

Xcopy - file not found error message

Hi experts,

I have installed the windows AIK-windows 7 tools onto a spare hard drive (drive F) on a desktop computer, on which windows 7 64bit is installed on drive C:

I have created an initial windows PE boot image within drive F and have mounted the image for editing and tried to run the following xcopy command in the deployment tools command promt (running as admin):

Xcopy f:\tools f:\winpe\mount\tools\ /s /I  
but I get a file not found error message an im not sure why, any suggestions and how to resolve? (see attached screenshot)
0
kevin1983
Asked:
kevin1983
  • 10
  • 7
  • 6
  • +2
2 Solutions
 
fr0nkCommented:
Did you mount the .wim with /mountrw?
0
 
fr0nkCommented:
Meaning: imagex /mountrw <id, find that with /info> f:\winpe\mount
Also, don't forget to do imagex /unmount /commit, after you're done.
0
 
kevin1983Author Commented:
Yes i mounted but using the following command:

dism /mount-wim /wimfile:f:\winpe\iso\sources\boot.wim /index:1 /mountdir:f:\winpe\mount

This run fine
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kevin1983Author Commented:
i will unmount and commit when done but i need to resolve the issue first
0
 
fr0nkCommented:
Can you attach the screenshot? I don't see any attached files.
0
 
kevin1983Author Commented:
sorry forgot to attach - yes now attached:
Xcopy.jpg
0
 
ZoppoCommented:
Hi kevin1983,

from the screenshot it looks as if you have no space-characters between the destination path and the two options '/s' and '/i' - it looks as if the command you really use is:

xcopy f:\tools f:\winpe\mount\tools\/s/I

Open in new window


You have to add spaces between the arguments, it should look somehow like this:

xcopy f:\tools f:\winpe\mount\tools\ /s /I

Open in new window


ZOPPO
0
 
kevin1983Author Commented:
that doesnt seem to work either
0
 
kevin1983Author Commented:
same eror message with: xcopy f:\tools f:\winpe\mount\tools\ /s /I

(ensuring space where you suggested)
0
 
Lionel MMSmall Business IT ConsultantCommented:
The problem is that you ahve a space between the two /s (space) /i
It should be /s/i (no spaces)

Xcopy f:\tools f:\winpe\mount\tools\ /s_/I--wrong
Xcopy f:\tools f:\winpe\mount\tools\ /s/I--right

But if that doesn't work either
Try this
xcopy f:\tools f:\winpe\mount\tools\ /s/e/i
Copy and paste this
0
 
ZoppoCommented:
@lionelmm: You wrote

> The problem is that you ahve a space between the two /s (space) /i
> It should be /s/i (no spaces)
>
> Xcopy f:\tools f:\winpe\mount\tools\ /s_/I--wrong

To be honest I don't believe this - I often used xcopy with spaces between the option params without problem. Samples you can find i.e. on Microsoft's MSDN pages even show option parameters seperated by spaces: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx

Adding '/e' IMO can't help since the only difference between '/s' and '/e' is that with '/e' even empty directories are copied.

ZOPPO
0
 
Lionel MMSmall Business IT ConsultantCommented:
You're right--I tested the space and did not get an error--I was just relying on my use of it--sorry!
0
 
ZoppoCommented:
@kevin1983: Are you sure the paths are correct? Especially the 'f:\tools'?

IMO the error message:
> File not found - tools
> 0 File(s) copied
can only occur if the source path isn't found.

If the destination path isn't found 'xcopy ... /i /s' tries to create it - if this creation fails the error message would be different.
0
 
RootsManCommented:
Try adding a backslash after the first tools directory.

xcopy f:\tools\ f:\winpe\mount\tools\ /s /I

Open in new window

0
 
RootsManCommented:
Looking at your screen shot, if you're trying to copy the contents of F:\Program Files\Windows AIK\Tools\ to f:\winpe\mount\tools\, then you should be in F:\Program Files\Windows AIK\ when you run the command.

CD to: F:\Program Files\Windows AIK\
Then
xcopy f:tools\ f:\winpe\mount\tools\ /s /I 

Open in new window


Note that there is no backslash after the first f:. This will tell xcopy to copy the "tools" directory from its current location, not the root of drive F:.

0
 
kevin1983Author Commented:
Thanks all for further comments, ive tried all the suggestions but none of them seem to work:

all have the same error message except RootsMan: i tried what you suggested in your lastest post but i get the following slightly different error message:

invalid path
0 file(s) copied
0
 
ZoppoCommented:
I still think it's a path-issue. Could you please execute the following command and post the output here:

dir f:\ /s /ad /b

Open in new window


If you think it's too much to post here you can use

dir f:\ /s /ad /b > f:\dirs.txt

Open in new window


and upload 'f:\dirs.txt' here.

ZOPPO
0
 
Lionel MMSmall Business IT ConsultantCommented:
or you can try
xcopy F:\"Program Files"\Windows AIK\Tools\ to f:\winpe\mount\tools\ /s/i
0
 
RootsManCommented:
Okay, try without the backslash after the first "tools."

xcopy f:tools f:\winpe\mount\tools\ /s /I 

Open in new window


If that doesn't work, then try:
      
xcopy f:tools\*.* f:\winpe\mount\tools\ /s /I 

Open in new window

0
 
RootsManCommented:
Remember you need to run the command from F:\Program Files\Windows AIK\
0
 
kevin1983Author Commented:
zoppo attached is the output you requested.
Thanks
dirs.txt
0
 
kevin1983Author Commented:
lionelmm:

I tried:
xcopy F:\"Program Files"\Windows AIK\Tools\ to f:\winpe\mount\tools\ /s/i

but an error says invalid number of parameters
0
 
kevin1983Author Commented:
RootsMan:

i tried: xcopy f:tools f:\winpe\mount\tools\ /s /I  
but an erorr says:
file not found - tools
0 files copied

Also tried
 xcopy f:tools\*.* f:\winpe\mount\tools\ /s /I  
but an eror says: file not found *.*
0 files copied
0
 
RootsManCommented:
How many files are in the "F:\Program Files\Windows AIK\Tools" ?
0
 
ZoppoCommented:
ok, from the 'dirs.txt' you can clearly see there simply isn't a folder 'f:\tools'.

So you have to find from where you want to copy anything to 'f:\winpe\mount\tools'.

Could it be you mean 'f:\Program Files\Windows AIK\Tools'?

In this case try this:

xcopy "f:\Program Files\Windows AIK\Tools" f:\winpe\mount\tools\ /s /I

ZOPPO
0
 
RootsManCommented:
Okay try manually creating the Tools directory in f:\winpe\mount\

The try your original command again, but enclose the source in quotes since there are spaces in the directory names:

xcopy "f:\Program Files\Windows AIK\Tools" f:\winpe\mount\tools\ /s /i

Open in new window

0
 
ZoppoCommented:
hm - IMO it's not needed to create the 'tools' destination folder manually since 'xcopy' will create it if it doesn't exist (that's the meaning of '\i')

The posted command is exactly the same I posted one comment earlier ...
0
 
RootsManCommented:
We must have been typing at the same time. :)
0
 
kevin1983Author Commented:
Thanks all for your input,

Rootsman and Zoppo your latest suggestions both worked fine thanks :-) happy a solution was found.

Kevin
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 10
  • 7
  • 6
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now