Jump to content

Move all folders in desktop folder?


dcer
 Share

Recommended Posts

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)

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...