1.

Solve : Batch Delete Files And Folders?

Answer»

I Seriously Need Help My Friends ! I Am Making Dos Setup For Some Portable Programs

I Want A Batch To Do The Foll Things -

1] It Is In .\Other Folder But Should Be Exectued From "temp" Folder (Basically This Work Could Be Done By WRAR , But Still If Another Steps)


2] After EXECUTION It Should Delete The Files.ext And Folders In .\Other Folder.


3] Lastly It Should Delete Itself And The .\Other Directory. Quote from: the_mad_joker on March 27, 2010, 10:41:42 AM

1] It Is In .\Other Folder But Should Be Exectued From "temp" Folder (Basically This Work Could Be Done By WRAR , But Still If Another Steps)

2] After Execution It Should Delete The Files.ext And Folders In .\Other Folder.

3] Lastly It Should Delete Itself And The .\Other Directory.


C:\batch>type joke27.bat
Code: [Select]echo off
cd \
md other
cd other
echo HELLO joker > joker27.txt
md other2
cd other2
echo hello joker > joker28.txt

cd \
cd other
Type  joker27.txt
cd other2
type joker28.txt
cd \
cd other
cd other2
del /Q *.*
cd ..
rd other2
cd \
del /Q  c:\other\*.*
rd other

rem MV c:\batch\joke27.bat  c:\temp\
rem del c:\temp\joke27.bat
Output:
C:\batch>joke27.bat
hello joker
hello joker

C:\>THANKS Dude !!!!!


Discussion

No Comment Found