my update.... But running into problems with it not deleting everything in the My Pictures, My Videos, and My Music.... any suggestions?
******************
Dim sFileList()
Dim oFolder
Dim oFile
Dim objFSO
Dim sFileExtension
Dim sMessage
Dim objShell
Dim strPath
'// Run the cleanfolder function for the current directory i.e., desktop
Set objShell = CreateObject ("WScript.Shell")
sDesktop = objShell.SpecialFolders("Desktop")
msgbox sDesktop
CleanFolder sDesktop
'// Run the cleanfolder function for My Documents
sMyDocuments = objShell.SpecialFolders("MyDocuments")
msgbox sMyDocuments
CleanFolder sMyDocuments
sub CleanFolder (sFolderName)
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set oFolder = objFSO.GetFolder(sFolderName)
'// We are looping through all the files we found in the folder
For Each oFile In oFolder.Files
'// We are getting the file extension
sFileExtension = Right(oFile.name, 3)
'// We are checking if it is not a shortcut
If sFileExtension <> "lnk" and sFileExtension <> "vbs" Then
'// It's not a shortcut, so delete it
'oFile.Delete
msgbox "We'll delete " & oFile.Name
End IF
'// Loop to the next file in the Files collection
Next
Set objSubFolder = oFolder.SubFolders
For each oSubfolder in objSubFolder
's = oSubfolder.name & vbCrLf
'msgbox s
'oSubfolder.Delete
msgbox "We'll delete " & oSubfolder.Name
Next
End sub