Deleting Copied files from source using DOS

Posted on 2004-08-26
Last Modified: 2010-04-17

I have a server with a RAID storage containing 1TB of Data.  I need to run a process on that data but unable to do so due to its size.  What I plan to do is copy half the files from RAID1 onto a second RAID (RAID2) then delete the copied files from its source on RAID1 so I can create space without losing files.  
Is there a way how to create a batch file which copies 500Gig of files then deletes the files it has copied from source RAID1 automatically.  The easy way would be to use windows explorer but the program locks up due to the size of the directory.

Any ideas?
Can anyone help!!  There’s Beers in it if you live near!

Question by:LUC4S
  • 4
  • 3

Accepted Solution

LRHGuy earned 168 total points
ID: 11901597
Have you considered using the MOVE command?

Move c:\thatfile.txt d:\tohere

You could write a batch file to move from raid1 to raid2. The move command automatically copies then deletes. You might be able to do it by moving all the files beginning with A*, then B*, etc.

Need more?

Assisted Solution

IceColdas earned 166 total points
ID: 11901721
you can use either TotalCommander (for windows) -
VolkovCommander / Dos NAvigator (for DOS) -
But, if the files have names longer than 8 characters, then you should use TotalCommander, because the dos programs will truncate the file name (i.e. : "programming.txt" will be renamed to "progra~1.txt")
LVL 11

Assisted Solution

coopzz earned 166 total points
ID: 11913339
well if you want to do it in a bat file .. you could try this

xcopy "c:\sourceDir\" "d:\destinationDir\" /c/h/e/r/k/y
deltree "c:\sourceDir"

keep in mind thought with the /c in the xcopy it will continue to run even on errors that occured.
with deltree you will propbably have to search the web for this ol' programm

lookup the extensions if you want to know what they mean
xcopy /?
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.


Expert Comment

ID: 11913399
i think that    xcopy32  will do better, if long file names;
use it same as coopzz said;
if u run it from DOS enviroment, then run smartdrv.exe before doing copy & delete;
it will improve the performance very much
LVL 11

Expert Comment

ID: 11913422
actually by this site

you can do on xp/2000
rmdir /S /Q "c:\sourceDir\"
and it will remove all files and things. instead of the deltree

LVL 11

Expert Comment

ID: 11913684
whats the smartdrv.exe do?? and is it and old windows os program??

Expert Comment

ID: 11930705
smartdrv acts like a memory buffer for the data read from the hard disk
it is a program that can be run both in DOS and WINDOWS
u can find it in windows 98, in the windows directory
LVL 11

Expert Comment

ID: 12175080
I would believe he got his answer and never came back.

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 86
allswap challenge 6 99
Please explain: Aspect Oriented Programming 2 94
Auto-indent certain lines in Notepad++ 10 76
This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

803 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