CGRemakes Posted February 1, 2011 Share Posted February 1, 2011 Sorry, that probably didn't come accross the way I intended it. I didn't mean it with any degree of contempt. I know how difficult it is to write a UDF from scratch, and I would absolutely be lost without the help of members of this forum. Your script may not fit my needs 100%, but it will get me about 90% of the way there, so there is no reason I couldn't just tweak it to get it the other 10%. I never intended to imply your script was not worthy of use or reference, and I would have to write a new one from scratch. This will be the last post in this particular thread about a _FileListToArray alternative, as it is starting to get off topic (I appologize for that). Just know, I greatly respect your work and efforts, as well as those of everyone. Link to comment Share on other sites More sharing options...
stamandster Posted February 3, 2011 Share Posted February 3, 2011 Really nice script! Thanks! Link to comment Share on other sites More sharing options...
CGRemakes Posted February 3, 2011 Share Posted February 3, 2011 Does this happen to copy open files? If not, is Volume Shadow copy the only way around that? I'm trying to do a custom backup solution, so it needs to be able to copy files even if it's in use. Link to comment Share on other sites More sharing options...
Yashied Posted February 17, 2011 Author Share Posted February 17, 2011 The library has been updated to version 1.3. Now you can copy or move a directories with all its sub-directories and files (see examples). Also added function _Copy_Pause() to suspend and resume a process of copying or moving files. For more information, see description of each function within the library. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted February 17, 2011 Share Posted February 17, 2011 Still on my todo list to use this in SMF, thanks for the update ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted February 17, 2011 Author Share Posted February 17, 2011 Soon there will be nothing that could not be done by using your excelent SMF. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Lupo73 Posted March 4, 2011 Share Posted March 4, 2011 I know it is a Copy udf ..but have you considered to implement also the support to Move files? Because if an user desire to move files with your udf have to copy+delete them, but it needs much more time than move process if is done on the same volume. Anyway thanks for the very good udf! It is used as coping core of DropIt software. SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
Yashied Posted March 4, 2011 Author Share Posted March 4, 2011 (edited) Copy UDF support in full as copying and moving._Copy_CopyDir() - Copying a directory._Copy_CopyFile() - Copying a file._Copy_MoveDir() - Moving a directory._Copy_MoveFile() - Moving a file or directory (source and destination directories must be on the same drive).This UDF is based on two API functions:CopyFileEx()MoveFileWithProgress() Edited March 4, 2011 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Lupo73 Posted March 4, 2011 Share Posted March 4, 2011 D'oh! ..I'm getting older..really sorry for this my lack. SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
Lupo73 Posted September 6, 2011 Share Posted September 6, 2011 A question about this UDF: shared folders and/or UNC paths are supported as destination paths? SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
Yashied Posted September 7, 2011 Author Share Posted September 7, 2011 A question about this UDF: shared folders and/or UNC paths are supported as destination paths?Yes. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Lupo73 Posted September 8, 2011 Share Posted September 8, 2011 Very good ..and what is the specific syntax to be used? thanks! SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
Yashied Posted September 30, 2011 Author Share Posted September 30, 2011 The library has been updated to version 1.4. Added ability to specify a user-defined callback function to call when a file of the same name as the currently copying or moving file already exists in the destination directory. This is actual when you copy or move directories because it is done recursively, and you cannot know in advance whether exist a file of the same name in the target directory. This callback can help you decide whether to overwrite an existing file, or not. See description for the _Copy_CopyDir() and _Copy_MoveDir() functions for more information. Note that this library only works with Copy.dll version 1.4 (inside archive). My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Lupo73 Posted November 7, 2011 Share Posted November 7, 2011 (edited) I updated Copy UDF in a script to the last version. The script opens the dll at the beginning of the copy and close it at the end, so it is possible to open and close the dll more times in a session of the script. I found that _Copy_CloseDll() returns error 4 after the first copy and so the script is closed the next time _Copy_OpenDll() is called. I modified the "Example 3" to open dll after Copy click and close dll completed the copy, to test the problem. The issue persists also in this simple code. I hope to be helpful with this report and sorry for my old approximate posts. Update: this is the modified example. expandcollapse popup#Include <EditConstants.au3> #Include <GUIConstantsEx.au3> #Include "Copy.au3" Opt('MustDeclareVars', 1) Opt('TrayAutoPause', 0) Global $hForm, $Input1, $Input2, $Button1, $Button2, $Button3, $Button4, $Data, $Msg, $Path, $Progress, $State, $Copy = False, $Pause = False Global $Source = '', $Destination = '' $hForm = GUICreate('MyGUI', 360, 163) GUICtrlCreateLabel('Source:', 14, 23, 58, 14) $Input1 = GUICtrlCreateInput('', 74, 20, 248, 19, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE)) GUICtrlSetState(-1, $GUI_DISABLE) $Button1 = GUICtrlCreateButton('...', 326, 19, 21, 21) GUICtrlCreateLabel('Destination:', 14, 55, 58, 14) $Input2 = GUICtrlCreateInput('', 74, 52, 248, 19, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE)) GUICtrlSetState(-1, $GUI_DISABLE) $Button2 = GUICtrlCreateButton('...', 326, 51, 21, 21) $Progress = GUICtrlCreateProgress(14, 94, 332, 16) $Button3 = GUICtrlCreateButton('Copy', 135, 126, 80, 21) $Button4 = GUICtrlCreateButton(';', 326, 126, 21, 21) GUICtrlSetFont(-1, 10, 400, 0, 'Webdings') GUICtrlSetState(-1, $GUI_DISABLE) GUISetState() While 1 If $Copy Then $State = _Copy_GetState() If $State[0] Then $Data = Round($State[1] / $State[2] * 100) If GUICtrlRead($Progress) <> $Data Then GUICtrlSetData($Progress, $Data) EndIf Else Switch $State[5] Case 0 GUICtrlSetData($Progress, 100) MsgBox(64, '', 'File was successfully copied.', 0, $hForm) Case 1235 ; ERROR_REQUEST_ABORTED MsgBox(16, '', 'File copying was aborted.', 0, $hForm) Case Else MsgBox(16, '', 'File was not copied.' & @CR & @CR & $State[5], 0, $hForm) EndSwitch GUICtrlSetData($Progress, 0) GUICtrlSetState($Button1, $GUI_ENABLE) GUICtrlSetState($Button2, $GUI_ENABLE) GUICtrlSetState($Button4, $GUI_DISABLE) GUICtrlSetData($Button3, 'Copy') GUICtrlSetData($Button4, ';') $Copy = 0 _Copy_CloseDll() MsgBox(16, "Error Closing", @error) EndIf EndIf $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop Case $Button1 $Path = FileOpenDialog('Select Source File', StringRegExpReplace($Source, '[^]*Z', ''), 'All Files (*.*)', 3, StringRegExpReplace($Source, '^.*', ''), $hForm) If $Path Then GUICtrlSetData($Input1, $Path) $Source = $Path EndIf Case $Button2 $Path = FileOpenDialog('Select Destination File', StringRegExpReplace($Destination, '[^]*Z', ''), 'All Files (*.*)', 2, StringRegExpReplace($Source, '^.*', ''), $hForm) If $Path Then GUICtrlSetData($Input2, $Path) $Destination = $Path EndIf Case $Button3 If $Copy Then _Copy_Abort() Else If (Not $Source) Or (Not $Destination) Then MsgBox(16, '', 'The source and destination file names must be specified.', 0, $hForm) ContinueLoop EndIf If FileExists($Destination) Then If MsgBox(51, '', $Destination & ' already exists.' & @CR & @CR & 'Do you want to replace it?', 0, $hForm) <> 6 Then ContinueLoop EndIf EndIf If Not _Copy_OpenDll() Then MsgBox(16, "Error Opening", @error) Exit EndIf GUICtrlSetState($Button1, $GUI_DISABLE) GUICtrlSetState($Button2, $GUI_DISABLE) GUICtrlSetState($Button4, $GUI_ENABLE) GUICtrlSetData($Button3, 'Abort') _Copy_CopyFile($Source, $Destination) $Copy = 1 EndIf Case $Button4 $Pause = Not $Pause If $Pause Then GUICtrlSetData($Button4, '4') Else GUICtrlSetData($Button4, ';') EndIf _Copy_Pause($Pause) EndSwitch WEnd Edited November 7, 2011 by Lupo73 SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
RugWarrior Posted November 15, 2011 Share Posted November 15, 2011 Like this UDF And I also like all these great UDFs like this one! Really nice! Link to comment Share on other sites More sharing options...
Yashied Posted January 3, 2012 Author Share Posted January 3, 2012 I updated Copy UDF in a script to the last version. The script opens the dll at the beginning of the copy and close it at the end, so it is possible to open and close the dll more times in a session of the script.I found that _Copy_CloseDll() returns error 4 after the first copy and so the script is closed the next time _Copy_OpenDll() is called. I modified the "Example 3" to open dll after Copy click and close dll completed the copy, to test the problem. The issue persists also in this simple code. I hope to be helpful with this report and sorry for my old approximate posts.Fixed. Please download again. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Lupo73 Posted January 4, 2012 Share Posted January 4, 2012 Thanks! It works fine SFTPEx, AutoCompleteInput, _DateTimeStandard(), _ImageWriteResize(), _GUIGraduallyHide(): some AutoIt functions. Lupo PenSuite: all-in-one and completely free selection of portable programs and games. DropIt: a personal assistant to automatically manage your files. ArcThemALL!: application to multi-archive your files and folders. Link to comment Share on other sites More sharing options...
supersonic Posted April 4, 2012 Share Posted April 4, 2012 (edited) Yashied,very well done! I would like to incorporate your UDF into one of my scripts.1) Currently I use 'FileCopy()' (flag = 9) because of copying file by file. Can this be managed somehow with the help of your UDF?2) I am not very familiar with loading/unloading DLLs. Is is possible to embed 'Copy(_x64).dll'?Greets,-supersonic.EDIT:1) I have wrote a litte wrapper to imitate the functionality of 'FileCopy()' but I'm not happy with the result. I think the code is somehow slow. Maybe there is a way to speed it up by using mainly the functionality of your UDF?2) I have searched the forum and found the MemoryDll UDF by Ward ( ). I brought both UDFs together and it seems to work fine. Please, could you evaluate if your UDF is "embedded DLL ready" and will work in all cases you defined?EDIT (2):I removed the attached file '_FileCopy.zip' due to the fact that there is a hugh bug in it. I will release a fixed version very soon. Please see (one of) my following post(s).Copy_MemoryDll.zip Edited November 6, 2012 by supersonic Link to comment Share on other sites More sharing options...
supersonic Posted April 17, 2012 Share Posted April 17, 2012 (edited) Yashied, attached is a working example of the '_FileCopy()' UDF. This function can only handle file by file - that means wildcards (*, ?) are not supported. Furthermore an existing file will be overwritten and its destination directory structure will be created if it doesn't exist (like 'FileCopy()' with 'flag = 9'). This UDF is still somehow slow - maybe someone can help me to speed it up??? Greets, -supersonic._FileCopy.zip Edited April 17, 2012 by supersonic Link to comment Share on other sites More sharing options...
Syed23 Posted June 10, 2012 Share Posted June 10, 2012 Hi Yashield,This is awesome UDF. I am currently working on a tool which needs to copy Directories from one location to another. some of the directories are having more than 1GB data.in those situation the GUI get freezes.. do you have any suggestion how to use this UDF in my code. Please have a look at this hope you can help me.. Please!!!! Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] 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