Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
This time i will make it clear what i am trying to establish...please help me...
firstly, i have lots of files with extension *.zip(for example 123.zip) after i unzip them it gives me *.mp3(123.mp3-same name but different extension). However, there are some spoilt zip files which does not produce *.mp3. What i want is to del those zip files which is successfully extracted to give its mp3 files, and then keep the spoilt ones. i have created the batch file to delete the zip files but it does not spare the spoilt ones. therefore i thought of a way by using the command "dir/b *.mp3 > goodmp3.bat" to produce the list of unzip files, then i use a string replacement program to edit the goodmp3.bat by replacing all ".mp3" strings with ".zip" string. Now goodmp3.bat contains the list of zipfiles that are not spoilt. while the rest are spoilt. therefore, by adding "del " to every line in the goodmp3.bat file, i can del the good zip files and keep the bad ones. can someone help me on this? thanks alot.

In additional, Can someone help me on the part:
adding "del " string to every line of the batch file and stop adding after the last valid line with a filename is reachedthe list goes like this:
1.zip
dcasd.zip
asdad.zip
asdasd.zip
...etcwhat i want is the final file:
del 1.mp3
del dcasd.mp3
del asdad.mp3
del asdasd.mp3
...etc
with out adding any unneccessary "del "
to those empty lines that follow in the end of the file

![]() |
Shutdown pc via apm
|
floppy detection
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |