AlMax3000 Posted December 1, 2019 Share Posted December 1, 2019 (edited) You can make a program or solution that copies all files of a certain extension, example > .rar (only rar), and copies them to a directory too simple I solved 🙂 Edited December 1, 2019 by AlMax3000 Link to comment Share on other sites More sharing options...
Musashi Posted December 1, 2019 Share Posted December 1, 2019 37 minutes ago, AlMax3000 said: You can make a program or solution that copies all files of a certain extension, example > .rar (only rar), and copies them to a directory FileCopy (see example in the help) "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
AlMax3000 Posted December 1, 2019 Author Share Posted December 1, 2019 (edited) 4 minutes ago, Musashi said: FileCopy (see example in the help) yes bro... I had solved just with the example you posted, but I should create an array for the extension, otherwise I would have to copy the whole string whenever Edited December 1, 2019 by AlMax3000 Link to comment Share on other sites More sharing options...
Musashi Posted December 1, 2019 Share Posted December 1, 2019 (edited) 51 minutes ago, AlMax3000 said: but I should create an array for the extension, otherwise I would have to copy the whole string whenever FileCopy accepts Wildcards e.g. *.rar Maybe you mean something like this 🤔 : #include <FileConstants.au3> #include <WinAPIShPath.au3> Opt('MustDeclareVars', 1) Global $sSourceDir, $sDestDir, $iCopyResult Global $aExtensions[4] = ["*.jpg", "*.gif", "*.avi ", "*.rar"] $sSourceDir = _WinAPI_PathAddBackslash(@ScriptDir & "\TestCopySource") $sDestDir = _WinAPI_PathAddBackslash(@ScriptDir & "\TestCopyDest") For $i = 0 To UBound($aExtensions) - 1 ConsoleWrite("+ Copy Extension = " & $aExtensions[$i] & @CRLF) $iCopyResult = FileCopy($sSourceDir & $aExtensions[$i], $sDestDir, $FC_OVERWRITE + $FC_CREATEPATH) ConsoleWrite("> Result = " & $iCopyResult & " (1 = ok , 0 = not ok/no files)" & @CRLF) Next By the way: what is the purpose of the game graphic? Edited December 1, 2019 by Musashi AlMax3000 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
AlMax3000 Posted December 1, 2019 Author Share Posted December 1, 2019 13 minutes ago, Musashi said: FileCopy accepts Wildcards e.g. *.rar Maybe you mean something like this 🤔 : #include <FileConstants.au3> #include <WinAPIShPath.au3> Opt('MustDeclareVars', 1) Global $sSourceDir, $sDestDir, $iCopyResult Global $aExtensions[4] = ["*.jpg", "*.gif", "*.avi ", "*.rar"] $sSourceDir = _WinAPI_PathAddBackslash(@ScriptDir & "\TestCopySource") $sDestDir = _WinAPI_PathAddBackslash(@ScriptDir & "\TestCopyDest") For $i = 0 To UBound($aExtensions) - 1 ConsoleWrite("+ Copy Extension = " & $aExtensions[$i] & @CRLF) $iCopyResult = FileCopy($sSourceDir & $aExtensions[$i], $sDestDir, $FC_OVERWRITE + $FC_CREATEPATH) ConsoleWrite("> Result = " & $iCopyResult & " (1 = ok , 0 = not ok/no files)" & @CRLF) Next By the way: what is the purpose of the game graphic? yes Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 1, 2019 Moderators Share Posted December 1, 2019 AlMax3000, As the graphics also appear in this thread , we will assume there is a link and lock this one too. Please read the Forum rules before you post again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 1, 2019 Moderators Share Posted December 1, 2019 (edited) 1 hour ago, Musashi said: By the way: what is the purpose of the game graphic? Why would you help and then ask why they're breaking the rules? @AlMax3000 You appear not to have read our forum rules, especially the section on game automation. Please read them now Edit: Too slow Edited December 1, 2019 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts