0

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
  • You could consider using the MOVE command instead of XCOPY – adam Jan 12 '11 at 5:09
  • xcopy much more reliable... – Amir Jan 13 '11 at 11:17
1

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.

| 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? – Amir Jan 12 '11 at 6:04
  • RD /s /q is much more better :) – Amir Jan 12 '11 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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