Ola Lindberg


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.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>