probedrone Posted August 29, 2006 Share Posted August 29, 2006 is there a way to set a progress bar for DirCopy or FileCopy? Link to comment Share on other sites More sharing options...
Valuater Posted August 29, 2006 Share Posted August 29, 2006 search "Scripts & Scraps" there are LOTS of them 8) Link to comment Share on other sites More sharing options...
mr_unreliable Posted September 5, 2006 Share Posted September 5, 2006 sorry about posting vbScript code here, but it is easily converted to autoit. As the newer version of autoit can use com objects, it ought to be able to use "Shell.Automation". The point of this example is that it will use the same system capabilities as when you copy files using the system (context menu), and you will get the same system dialog with the progressbar and animation (that is, those pieces of paper flying through the air). One caution, with the system dialog, the copy operation must take long enough for the dialog to show and the animaton "to develop". Otherwise you won't see anything. ' script to demo shell.application Option Explicit Dim oSHApp ' as object Dim sSrc, sDest ' as string Const FOF_SIMPLEPROGRESS = 256 '(&H100) Set oSHApp = CreateObject("Shell.Application") sSrc = "c:\windows\temp\*.*" sDest = "A:\" ' use ms Animated Copy Applet, showing names and progressbar... oSHApp.Namespace(sDest).CopyHere sSrc ' use ms Animated Copy Applet, showing progressbar (but no names)... oSHApp.Namespace(sDest).CopyHere sSrc, FOF_SIMPLEPROGRESS Set oSHApp = nothing ' clean up WScript.Quit If you want to take this one level deeper, then you can use the system api directly. Go to msdn, and read up on the SHFileOperation api, and its associated SHFILEOPSTRUCT typedef. When you use the api, you get the same system dialog, progbar and animation you get with the Shell.App "CopyHere" method. Also the same caveat applies, if the copy doesn't take very long you won't ever see the dialog. But then, the only reason to show a progressbar anyway is to give users something to watch during a lengthy copy operation. cheers, jw Link to comment Share on other sites More sharing options...
probedrone Posted September 5, 2006 Author Share Posted September 5, 2006 thx mate, thing is I already came across a solution like yours, and im running into even more problems.Can you take a look at my other post @ http://www.autoitscript.com/forum/index.php?showtopic=32196 to see if theres any errors in my code that you can find? Link to comment Share on other sites More sharing options...
Danny35d Posted September 5, 2006 Share Posted September 5, 2006 Take a look to this script done by eltorro... AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
probedrone Posted September 6, 2006 Author Share Posted September 6, 2006 is it me or does it not support directory or multiply file copys? Link to comment Share on other sites More sharing options...
livewire Posted September 6, 2006 Share Posted September 6, 2006 (edited) Search the forum...the one I posted does directories, multiple files, moving files, deleting files, etc. See here.-Livewire Edited September 6, 2006 by livewire 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