Solved

After Xcopy finish, I want to remove

Posted on 2004-04-27
4
737 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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 video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now