Sign in to follow this  
Followers 0
dcer

Move all folders in desktop folder?

4 posts in this topic

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)

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Thansk... even though don't need the save file, so i've just added a FileDelete line for the savelist :D

Share this post


Link to post
Share on other sites

nice. let me know ifyou add anymore features. turns out to be pretty useful.


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0