Ilounah Posted Wednesday at 12:15 PM Share Posted Wednesday at 12:15 PM Can an AUTOIT program automatically move newly saved files from the Desktop to a specific folder to avoid dumping on the Desktop, while leaving old applications and necessary folder icon links? Link to comment Share on other sites More sharing options...
argumentum Posted Wednesday at 12:38 PM Share Posted Wednesday at 12:38 PM Well yes !. If a file of extension .whatever is created, your script could move it to a folder of your choosing. I believe in you !. You can do it !. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Developers Jos Posted Wednesday at 08:58 PM Developers Share Posted Wednesday at 08:58 PM Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted Wednesday at 10:54 PM Share Posted Wednesday at 10:54 PM (edited) Oh well, there you go... #include <File.au3> HotKeySet("!{ESC}", _Exit) Main(@DesktopDir, "C:\Apps\Temp") Func Main($sSourceDir, $sTargetDir) Local $aBase = _FileListToArray($sSourceDir) ;_ArrayDisplay ($aBase) Local $aList While Sleep(5 * 1000) ; check every 5 secs $aList = _FileListToArray($sSourceDir) For $i = 1 To $aList[0] _ArraySearch($aBase, $aList[$i], 1) If @error Then ; do not use FileMove : under some circumstances it may not work properly FileCopy($sSourceDir & "\" & $aList[$i], $sTargetDir & "\" & $aList[$i], $FC_OVERWRITE) FileDelete($sSourceDir & "\" & $aList[$i]) EndIf Next WEnd EndFunc ;==>Main Func _Exit() Exit EndFunc ;==>_Exit Edited Friday at 12:58 PM by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ioa747 Posted Thursday at 01:58 AM Share Posted Thursday at 01:58 AM @Nine directory friendly #include <File.au3> HotKeySet("!{ESC}", _Exit) Main(@DesktopDir, "C:\Apps\Temp") Func Main($sSourceDir, $sTargetDir) Local $aBase = _FileListToArray($sSourceDir) ;~ _ArrayDisplay ($aBase) Local $aList While Sleep(10 * 1000) ; check every 10 secs $aList = _FileListToArray($sSourceDir) For $i = 1 To $aList[0] _ArraySearch($aBase, $aList[$i], 1) If @error Then ; do not use FileMove : under some circumstances it may not work properly If StringInStr(FileGetAttrib($sSourceDir & "\" & $aList[$i]), "D") = 0 Then FileCopy($sSourceDir & "\" & $aList[$i], $sTargetDir & "\" & $aList[$i], $FC_OVERWRITE) FileDelete($sSourceDir & "\" & $aList[$i]) Else DirCopy($sSourceDir & "\" & $aList[$i], $sTargetDir & "\" & $aList[$i], $FC_OVERWRITE) DirRemove($sSourceDir & "\" & $aList[$i], 1) EndIf EndIf Next WEnd EndFunc ;==>Main Func _Exit() Exit EndFunc ;==>_Exit I know that I know nothing 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