• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Sorting files and deleting

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

updawg

StarCraft II Fanatic
Joined
May 19, 2006
Location
NOVA
I have two groups of files with the same name but different file extensions. For example 1.jpg 1.exe 2.jpg 2.exe, but I have some stragglers like 3.exe with no pair that I want to remove. Is there any easy way to do this for 1000s of files?
 
What I would do first, is get a
Code:
dir /b > mybatch.bat
of the directory.

Then go to excel and use the advanced filters to filter out what you want to keep. After that you can use excel or notepad++ to add in the front of each line
Code:
del
and you are good to go. If you are not familiar with excel just sent me the dir /b output and I'll give you a hand.
 
I'm not really familiar with excel, the files right now are in two different directories based on the extension. So I should combine them run that cmd and you can take a look at the batch file and send it back? If so you are a life saver.
 
I'm not really familiar with excel, the files right now are in two different directories based on the extension. So I should combine them run that cmd and you can take a look at the batch file and send it back? If so you are a life saver.

No, just do
Code:
dir /s/b MAIN_DIRECTORY > mybatch.bat

Having them separately can help a bit.
 
I would just like to personally thank anhikilator, we had an email exchange and he was able to import the bat file into excel weed out the unneeded files and write up a bat file to delete all the unnecessary files and sent it back to me. He went above and beyond and deserves to be commended!
 
Now that is good stuff, especially from a new member. Way to go anhikilator, and welcome to OCF! :welcome:
 
Back