General Computing
windows windows-xp batch-file xcopy cut-and-paste
Updated Mon, 13 Jun 2022 21:34:49 GMT

how check all of my file copy correctly by batch file?


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



Solution

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.





Comments (2)

  • +0 – 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? — Jan 12, 2011 at 06:04  
  • +0 – RD /s /q is much more better :) — Jan 12, 2011 at 06:32