Solved

After Xcopy finish, I want to remove

Posted on 2004-04-27
4
739 Views
Last Modified: 2012-06-27
My problem is:

I have this sequence:
C:\ana>XCOPY    C:\ana\*  C:\ana2\*  /S /E /I  /F /Y /Z  1>>c:\BITACORA.log
C:\ana>rmdir /Q .
The process cannot access the file because it is being used by another process.

i think didn't finished the copy.

--> After Xcopy finish, I want to remove all files found in "ana". What i would do?
0
Comment
Question by:arianym
4 Comments
 
LVL 3

Accepted Solution

by:
255x4 earned 25 total points
ID: 10932014
You have to cd.. first.

C:\ana>rmdir /Q .

This tries to remove the current directory.  What you probably want to do is to change directory to the next higher up (cd ..) and then remove the directory (rmdir /Q ana).
0
 
LVL 30

Assisted Solution

by:SteveGTR
SteveGTR earned 25 total points
ID: 10932346
On the same drive you could do a move:

move c:\ana\*.* c:\ana2\*.*

It's alot quicker. Then as 255x4 stated do a cd .. and then do the rd c:\ana /q

Good Luck,
Steve
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 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