I am trying to create a script to clean up users' desktops by moving all desktop folders and files (except the two hidden "desktop.ini" files and a MyDesktop.lnk shortcut) to a different folder. The script below will move files but not folders. The other issue with the script is that it doesn't seem to execute from a location other than the user's desktop. I would appreciate any suggestions.
#include <File.au3>
MsgBox(64, "Desktop", "Cleaning up Desktop. This box will close in 4 seconds.", 4)
$Files = _FileListToArray(@DesktopDir,"*",1)
For $Index = 1 To $Files[0]
If StringRight($Files[$Index],4) <> ".ini, MyDesktop.lnk" Then
FileMove($Files[$Index],'F:\HOME\Desktop')
EndIf
Next