[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Xcopy - file not found error message

Posted on 2011-02-22
29
Medium Priority
?
1,402 Views
Last Modified: 2012-05-11
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
Comment
Question by:kevin1983
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
  • 6
  • +2
29 Comments
 
LVL 4

Expert Comment

by:fr0nk
ID: 34950472
Did you mount the .wim with /mountrw?
0
 
LVL 4

Expert Comment

by:fr0nk
ID: 34950493
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
 

Author Comment

by:kevin1983
ID: 34950554
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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

Author Comment

by:kevin1983
ID: 34950576
i will unmount and commit when done but i need to resolve the issue first
0
 
LVL 4

Expert Comment

by:fr0nk
ID: 34950654
Can you attach the screenshot? I don't see any attached files.
0
 

Author Comment

by:kevin1983
ID: 34950701
sorry forgot to attach - yes now attached:
Xcopy.jpg
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 34953054
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
 

Author Comment

by:kevin1983
ID: 34953138
that doesnt seem to work either
0
 

Author Comment

by:kevin1983
ID: 34953164
same eror message with: xcopy f:\tools f:\winpe\mount\tools\ /s /I

(ensuring space where you suggested)
0
 
LVL 25

Expert Comment

by:Lionel MM
ID: 34960193
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
 
LVL 31

Expert Comment

by:Zoppo
ID: 34960249
@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
 
LVL 25

Expert Comment

by:Lionel MM
ID: 34960330
You're right--I tested the space and did not get an error--I was just relying on my use of it--sorry!
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 34960394
@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
 
LVL 6

Expert Comment

by:RootsMan
ID: 34960403
Try adding a backslash after the first tools directory.

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

Open in new window

0
 
LVL 6

Expert Comment

by:RootsMan
ID: 34960457
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
 

Author Comment

by:kevin1983
ID: 34960689
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
 
LVL 31

Expert Comment

by:Zoppo
ID: 34960910
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
 
LVL 25

Expert Comment

by:Lionel MM
ID: 34961022
or you can try
xcopy F:\"Program Files"\Windows AIK\Tools\ to f:\winpe\mount\tools\ /s/i
0
 
LVL 6

Expert Comment

by:RootsMan
ID: 34961559
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
 
LVL 6

Expert Comment

by:RootsMan
ID: 34961576
Remember you need to run the command from F:\Program Files\Windows AIK\
0
 

Author Comment

by:kevin1983
ID: 34961771
zoppo attached is the output you requested.
Thanks
dirs.txt
0
 

Author Comment

by:kevin1983
ID: 34961783
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
 

Author Comment

by:kevin1983
ID: 34961802
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
 
LVL 6

Expert Comment

by:RootsMan
ID: 34961832
How many files are in the "F:\Program Files\Windows AIK\Tools" ?
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 600 total points
ID: 34961932
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
 
LVL 6

Assisted Solution

by:RootsMan
RootsMan earned 600 total points
ID: 34962016
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
 
LVL 31

Expert Comment

by:Zoppo
ID: 34962461
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
 
LVL 6

Expert Comment

by:RootsMan
ID: 34962718
We must have been typing at the same time. :)
0
 

Author Closing Comment

by:kevin1983
ID: 34970897
Thanks all for your input,

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

Kevin
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question