For this to work and not delete your music you must have all your music in the ##music# folder and a mixed media folder for your pictures, videos and your recordings. this batch file deletes all the folders made by the sansa firmware and the macintosh computers and even has a neet polished menu! well enjoy.
to make this u must make a text file called sansa.bat in the root of your mp3 player. paist the following text into that file and save as sansa.bat and the save as type must be set to all files to eleminate the sansa.bat.txt problem. well hope this is useful. and this is for windows computers only.
ECHO off
CLS
:MENU
cls
ECHO.
ECHO...................................................
ECHO PRESS 1, 2, or 3 to select your task, or 4 to EXIT.
ECHO...................................................
ECHO.
ECHO 1 - Cleanup after Sandisk
ECHO 2 - Cleanup after Mac
ECHO 3 - Cleanup after Sandisk and Mac
echo 4 - EXIT
ECHO.
SET /P M=Type 1, 2, 3 or 4 then press ENTER:
IF %M%==1 GOTO Sandisk
IF %M%==2 GOTO Mac
IF %M%==3 GOTO All
IF %M%==4 GOTO EOF
:Sandisk
rmdir /s /q \##PORT#
rmdir /s /q \audible
rmdir /s /q \PHOTO
rmdir /s /q \Video
rmdir /s /q \music
rmdir /s /q \record
del \.scrobbler.log
del \sys_conf.sys
del \res_info.sys
del \version.sdk
del \mtable.sys
GOTO MENU
:Mac
attrib \finder.dat -h
attrib \"desktop df" -h
attrib \"Desktop DB" -h
attrib \fileid.dat -h
rmdir /s /q \Trash
rmdir /s /q \"Temporary Items"
rmdir /s /q \"Desktop Folder"
rmdir /s /q \TheVolumeSettingsFolder
rmdir /s /q \TheFindByContentFolder
del \"Desktop DB"
del \"Desktop DF"
del \finder.dat
del \FILEID.DAT
GOTO MENU
:All
attrib \finder.dat -h
attrib \"desktop df" -h
attrib \"Desktop DB" -h
attrib \fileid.dat -h
rmdir /s /q \##PORT#
rmdir /s /q \audible
rmdir /s /q \PHOTO
rmdir /s /q \Video
rmdir /s /q \music
rmdir /s /q \record
rmdir /s /q \Trash
rmdir /s /q \"Temporary Items"
rmdir /s /q \"Desktop Folder"
rmdir /s /q \TheVolumeSettingsFolder
rmdir /s /q \TheFindByContentFolder
del \.scrobbler.log
del \sys_conf.sys
del \res_info.sys
del \version.sdk
del \mtable.sys
del \"Desktop DB"
del \"Desktop DF"
del \finder.dat
del \FILEID.DAT
GOTO MENU
By the way this will work on any drive letter mp3 player and it only cleans up classic mac crap because i dont know what mac osx junk looks like.
this is ment for the sansa e200v2 nut it might work on others but i dont know. it does not work properly from the sandisk usb connection because sansa firmware hides the ## folders so it cant delete them so you must use the rockbox usb mode for it to work.
By the way Information about other os junk could be used to make it work for more operateing systems.
I fixed a bug where it couldent delete mac os9's hidden files but now it works.