I have to delete files from a sub folder with a same name. My file path is like as follows.
d:\\test\\test1\\archive\\*.txt
d:\\test\\try\\archive\\*.txt
d:\
You can use the /s switch for del to delete in subfolders as well.
Example
del D:\test\*.* /s
Would delete all files under test including all files in all subfolders.
To remove folders use rd, same switch applies.
rd D:\test\folder /s /q
rd doesn't support wildcards * though so if you want to recursively delete all subfolders under the test directory you can use a for loop.
for /r /d D:\test %a in (*) do rd %a /s /q
If you are using the for option in a batch file remember to use 2 %'s instead of 1.