Calistoga Posted June 25, 2008 Posted June 25, 2008 Hi, I wasn't sure what to search for, but if this has been answered before, please point me to the right place. Let's say that we have this variable: $FileTypes = "EXE;CMD;BAT;JPG" How can I make this; FileMove(@DesktopDir & "\*.*", @MyDocumentsDir & "\Random\", 9) move all filetypes listed in $FileTypes ? Eg. *.exe, *.jpg etc. Thanks in advance
DaRam Posted June 25, 2008 Posted June 25, 2008 Const $FileTypes = "EXE;CMD;BAT;JPG" Dim $I, $J, $aFileTypes $aFileTypes = StringSplit($FileTypes, ";") $J = UBound($aFileTypes) -1 For $I = 1 to $J FileMove(@DesktopDir & "\*." & $aFileTypes[$I], @MyDocumentsDir & "\Random\", 9) Next ;$I Hi, I wasn't sure what to search for, but if this has been answered before, please point me to the right place. Let's say that we have this variable: $FileTypes = "EXE;CMD;BAT;JPG" How can I make this; FileMove(@DesktopDir & "\*.*", @MyDocumentsDir & "\Random\", 9) move all filetypes listed in $FileTypes ? Eg. *.exe, *.jpg etc. Thanks in advance
weaponx Posted June 25, 2008 Posted June 25, 2008 $FileTypes = "EXE;CMD;BAT;JPG" $aFileTypes = StringSplit($FileTypes, ";") For $X =1 to $aFileTypes[0] FileMove(@DesktopDir & "\*." & $aFileTypes[$X], @MyDocumentsDir & "\Random\", 9) Next
DjDeep00 Posted June 25, 2008 Posted June 25, 2008 @DaRam & @Weaponx...you guys beat me to it...Good thing I refreshed before I posted the same response.
DaRam Posted June 25, 2008 Posted June 25, 2008 @DaRam & @Weaponx...you guys beat me to it...Good thing I refreshed before I posted the same response.Been there, Done that
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