dcer Posted January 22, 2008 Posted January 22, 2008 I got this problem that i allways throw all my downloaded files to the desktop, and then some day i just move it all to one folder. What i would like is a program that moves all folders and files(moving the files aint a problem) to D:\Desktop\ What i've tried so far: #Include <File.au3> #Include <Array.au3> FileMove(@DesktopDir & "\*.", "D:\Desktop files",9) $FileList=_FileListToArray(@DesktopDir, "*", 2) DirMove($FileList, 1)
blademonkey Posted January 22, 2008 Posted January 22, 2008 Uses/Makes a Safelist. Maybe you wouldnt want to move all items. ya know? #Include <File.au3> #Include <Array.au3> $sTarget = "c:\stuff" $fSafe = "safelist.txt" if FileExists($sTarget)<> 1 then dircreate($sTarget) if FileExists($fSafe)<> 1 then FileWriteLine(@scriptdir & "\" & $fSafe,"") dim $akeepondesktop _FileReadToArray(@scriptdir & "\" &$fSafe,$akeepondesktop) $FileList=_FileListToArray(@DesktopDir, "*") for $x = 1 to ubound($FileList)-1 if _ArraySearch($akeepondesktop,$FileList[$x])=-1 then DirMove(@DesktopDir & "\"& $FileList[$x],$sTarget ,1) Next ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
dcer Posted January 23, 2008 Author Posted January 23, 2008 Thansk... even though don't need the save file, so i've just added a FileDelete line for the savelist
blademonkey Posted January 23, 2008 Posted January 23, 2008 nice. let me know ifyou add anymore features. turns out to be pretty useful. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now