forum

osu!cleaner: Get rid of beatmap folders without .osu files

posted
Total Posts
10
Topic Starter
FinnHallqvist
Hello guys,

recently I decided to delete alot of beatmaps in my osu! client using the "Delete all visible maps option". However later in the Edit-tab I found out that there are alot of "empty" beatmaps left (you can find them if you search for bpm=0).

Later I found out that those beatmaps still have .mp3, video and image files left in their folders, which often do not contain any .osu difficulties at all.

What does that mean?

It means you have song folders without beatmaps, which include audio, video and image files that take up space on your harddrive. So I decided to get rid of all of those folders without a .osu file and wrote a little program to aid my cause.

So I present to you: osu!cleaner

How to use:
  1. Download the program to your Desktop

  2. Open your command prompt (Windows: Windows Key -> type cmd -> press enter)

  3. Change your path to your Desktop path (example: "cd Desktop" or "cd C:/Users/YourName/Desktop")

  4. Type "java -jar osu!cleaner.jar"

  5. Enter your osu! song folder (example: C:/osu!/Songs) (I've taken measures to make sure that it only runs if you enter a pathname which includes "osu!" and "songs", so you dont delete everything with it)

  6. Enter "y" if you want to proceed, else enter "n"

  7. Press enter to proceed (triple security for you ;) )

  8. After that it will print a list of those beatmaps which got deleted.
Result: After you ran the program you only have songs in your songs folder which include beatmaps (.osu files). Note that remaining beatmaps still have their audio,video and image files.

Warning: If you use your songs folder for anything else than songs or have some self-made beatmaps I would advise you to save them before you run this program, as some of them may not contain .osu files and will get deleted in the process. Usually those are the beatmaps without a number in the name of their folder.

So I hope you like this program and can use your harddrive space for beatmaps that you can actually play osu! with ;)

Best Regards

FinnHallqvist
amepebbles
Underestimated. Powerful and cool tool we have here, THANK YOU!
grubus_old
Exception in thread "main" java.lang.NullPointerException
at execute.cleaner(execute.java:59)
at execute.main(execute.java:7)

java 8 64bit win 10
loveleft
incredible.
Tokakitake
Exception in thread "main" java.lang.NullPointerException
at execute.cleaner(execute.java:59)
at execute.main(execute.java:7)
aalexsu
Thank you so much! This is absolutely awesome, I deleted almost 18k low star maps but my folder size was exactly the same, I was pullin hair out figuring out how to delete it all but this solved it right away!
zxshima

Tokakitake wrote:

Exception in thread "main" java.lang.NullPointerException
at execute.cleaner(execute.java:59)
at execute.main(execute.java:7)


i may be a bit late, but the thread was bumped anyway, so..
you will encounter this problem if you type / in directory path. to fix it, when you get this message:
"Please enter your osu! song folder (example: C:/osu!/Songs)",
instead of C:/osu!/Songs you should type C:\osu!\Songs
hope it helps!
layne
Hey, I just solved my own issue with this tool and thought I'd share for anyone else that comes across this.

If you get an error like this one (specifically involving execute.java:59):

Tokakitake wrote:

Exception in thread "main" java.lang.NullPointerException
at execute.cleaner(execute.java:59)
at execute.main(execute.java:7)
and you're sure you're entering your osu! songs folder location correctly, then make sure you don't have any loose files (i.e. anything that isn't a folder) in your songs folder before running the tool (on Windows, you can find out if you have any such files by navigating to your songs folder in Windows Explorer and sorting by either Name or Type in descending order). I myself had a random .txt file at the end of my songs folder that was crashing the program in this way every time, and removing that file caused it to then work perfectly.

A short explanation of the bug, for those curious: this program tries to peek into every folder in your osu! songs directory, but (in its present state) it can't tell which files are sub-folders and which ones are just normal files, so if it encounters a normal file and tries to treat it like a folder (i.e. peek into it), it will simply crash.
CommandoBlack
Halved my song folder size. Very appreciated!
Pret
can anyone reupload this
i nuked my install the other day and the original puush is dead
edit: i actually found it on my old ssd and in case anyone wants a working link here you go
Please sign in to reply.

New reply