Calistoga Posted June 25, 2008 Share 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 Link to comment Share on other sites More sharing options...
DaRam Posted June 25, 2008 Share 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 Link to comment Share on other sites More sharing options...
weaponx Posted June 25, 2008 Share 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 Link to comment Share on other sites More sharing options...
DjDeep00 Posted June 25, 2008 Share Posted June 25, 2008 @DaRam & @Weaponx...you guys beat me to it...Good thing I refreshed before I posted the same response. Link to comment Share on other sites More sharing options...
Calistoga Posted June 25, 2008 Author Share Posted June 25, 2008 Thank you guys, worked perfectly! Link to comment Share on other sites More sharing options...
DaRam Posted June 25, 2008 Share 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 Link to comment Share on other sites More sharing options...
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