Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a batch file that copy all the files from src place to dest place.

I used xcopy command.

Now I want to make sure all of my file copy correctly and delete all the files in src folder, do you have any idea?

I dont know is there any command for delete the folder with all the files and folder inside it?

please advise me....

my source folder has below structure

> root | 
>         [sub folder1]
>         |
>         filex.s
>         filei.z 
>         [sub folder2]
>         |
>         filep.a
>         fileq.q
>         [sub folder3]
>         |
>         filex.s
>         filei.z
>         filsi.w 
> file1.xx 
> file2.cc 
> file3.ss
share|improve this question
    
You could consider using the MOVE command instead of XCOPY –  adam Jan 12 '11 at 5:09
    
xcopy much more reliable... –  rima Jan 13 '11 at 11:17
add comment

1 Answer

up vote 1 down vote accepted

del /s would delete from subdirectories. fc would compare two files.

dir/s/b /a-d > list.bat would dump all file names to a text file.

You could use Notepad++'s Macros to mass edit the text file to FC each file.

You could use a batch file to do a sort of for/each over the files doing the same thing.

share|improve this answer
    
del /s do not delete the folders for folders what should I do? del just delete all files, I want remove folder also...for comparison do u have any code? –  rima Jan 12 '11 at 6:04
    
RD /s /q is much more better :) –  rima Jan 12 '11 at 6:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.