?
Solved

After Xcopy finish, I want to remove

Posted on 2004-04-27
4
Medium Priority
?
754 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
2 Comments
 
LVL 3

Accepted Solution

by:
255x4 earned 100 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 100 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

830 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