Script to cleanup Windows hidden attributes and AlbumArtSmall.jpg

I wanted to remove the hidden files attributes and delete some types of files so I created the following bat-file.

attrib -R -A -S -H D:Music* /S /D
del /S /P D:Music*AlbumArtSmall.jpg D:Music*desktop.ini

(Don’t ask me why /S /D should be last on the line when using attrib and first when using del, but the manual said so.)

The first line removes all read only, archive, system and hidden -attributes on all files, folders and subfolders in folder D:Music.

The second line removes all files named AlbumArtSmall.jpg and desktop.ini from the folder D:Music and all it’s subfolders. The /P argument asks for confirmation so if you are sure you can remove it.

Publicerat av

Ola

Mångsysslande doer & klätterentusiast. Jag driver varumärket Sten & bloggen Klätterbilder. Jag konsultar inom IT & Marknadsföring samt undervisar inom webb på Folkuniversitetet. Jag älskar att fota. /// Doer & climbing enthusiast. I run the climbing brand Sten & the blog Klätterbilder. Consulting with IT & marketing & teaching at Folkuniversitetet. I love to take pictures.