Solved

After Xcopy finish, I want to remove

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
7-Zip Command Line Issues 12 87
command line argument to replace text in a file 4 59
Question to Zip 8 79
MS DOS script or .Net Script to rename a list of sub-folders 7 105
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…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

20 Experts available now in Live!

Get 1:1 Help Now