Sign in to follow this  
Followers 0
Danny35d

RoboCopy GUI

17 posts in this topic

#1 ·  Posted (edited)

I know there are several robocopy wrappers out in the internet but, you may have to pay to get all the functionality working, like CopyRite XP or the freewares that I found doesn't include all robocopy switches. So I combine the three wrappers I like the most and I create my own version of RoboCopyGUI. You will need robocopy.exe from Windows Server 2003 Resource Kit Tools.

Thanks to Holger for GUI Menu with icons and color and Big_Daddy for marqee style progress control

NOTE: I only tested on Windows XP Sp2 and using AutoIt 3.2.0.1 also, marquee style progress only work on Windows XP.

Previews downloads: 418

RobocopyGUI.zip

Edit:

10/01/2006 - v1.0.0.6

- Fix help file, when robocopyGUI start help file open. Also fix help file to open with any default browser.

10/01/2006 - v1.0.0.5

- Add checkbox, match destination folder to source folder.

- Fix _FixDate() function, now work with any international date format not just with US date format.

- Fix when selecting a root directory like C:\ as a Source or Target path robocopy won't work.

- Fix when selecting console options normal or maximized robocopy won't work.

- Fix FileSelectFolder didn't work under WinPe or Bartpe. To make it work be sure you have the following files at I386\System32 folder, the script will register the dlls for you.

Browseui.dll

Regsvr32.exe

Shdocvw.dll

Shell32.dll

07/17/2006 - v1.0.0.4

- Fix Save, now Prompt to overwrite file before saving.

- Fix Load & Save, script didn't Load or Save the console states(Hide, Normal, Maximum).

07/09/2006 - v1.0.0.3

- Add Recent File at the file menu. Keeping track of the last 5 open files.

07/08/2006 - v1.0.0.2

- Modify creating .cmd or .bat files by adding robocopy.exe path to the batch file.

- Modify UDF _ChenkEnvPath() to also search for robocopy.exe at the Temp folder.

07/07/2006 - v1.0.0.1

- Fix Load & Save, script didn't Load or Save the values of $Switches[n]

- Add MHz improvement by making the script search the system variable for Robocopy.exe

07/06/2006 - v1.0.0.0

Release date

Edited by Danny35d
1 person likes this

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites



This is superb.

I'll write again later on with a few thoughts -

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Nice. If I had to ask for an improvement, then search the system path variable for Robocopy.exe. I keep an additional address to path to point to an extra cmdline tools folder.

This may show my concern

Global $robocopy
If FileExists(@ScriptDir & '\robocopy.exe') Then
    $robocopy = @ScriptDir & '\robocopy.exe'
Else
    $path = EnvGet('path')
    $path_array = StringSplit($path, ';')
    If Not @error Then
        For $i = 1 To $path_array[0]
            If FileExists($path_array[$i] & '\robocopy.exe') Then
                $robocopy = $path_array[$i] & '\robocopy.exe'
                ExitLoop
            EndIf
        Next
    EndIf
EndIf

If Not $robocopy Then
    _Download('RoboCopy Not Found')
ElseIf FileGetVersion($robocopy) <> '5.1.1.1010' Then
    _Download('RoboCopy Wrong Version')
EndIf

MsgBox(0, 'Just checking', $robocopy)

Func _Download($sTitle)
    MsgBox(0, 'Just checking', 'not found')
EndFunc

Thanks :D

Edit:

Added Exitloop to save some extra loops if found quick

Edited by MHz

Share this post


Link to post
Share on other sites

Thanks MHz for the improvement, I will added to the script at soon I get home from work.


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Did some updates to the script check first post.

- Fix Load & Save, script didn't Load or Save the values of $Switches[n]

- Added MHz improvement by making the script search the system variable for Robocopy.exe

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

I did more updates, check first post.


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

fix minor bugs, check first post


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

New Updates...

Thanks Stefan from Germany for reporting problems with _FixDate() function. I fix some problems when selecting console options or selecting root directory robocopy won't work and also fix FileSelectFolder function won't work under WinPe or BartPe.

Check first post.

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Hi!

Just a (very) little thing: the "2 seconds granulity" (/FFT) is useful, not only for FAT, buf for many NAS, disk under samba/linux, etc.

I suggest at all robocopy's users to set the /FFT option by default.

Share this post


Link to post
Share on other sites

Check first post.

Fix help file always open when robocopy start.


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

anybody knows how to add to this version of robocopy a check box option so you could select individual files and folders???

please help!!!!!!!

thanks to danny35d for this great tool!

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Great tool. Anyway i can't compile the source : i keep on getting an error about an icon not found when compiling... how can i fix this?

EDIT: sorry it was my fault. I reinstalled AutoIT and now compiles alright. Sorry!

Edited by pierlo

Share this post


Link to post
Share on other sites

Hello,

I like this robocopygui but i like insert in the code string robocopy D:\ W:\%username%.

User cannot change sources path and target pah.... it is possible?

Share this post


Link to post
Share on other sites

Hello,

Congratulations, good script robocopygui.

I'd like insery in the code RobocopyGui.au3 the string D:\ W:\%username%. That users or technical support cant change sources path and target path...it is possible?

#include <Constants.au3>

$sourcedir = "D:\PartilhaNETBOOT\"
$destdir = "F:\Autoitteste\"

$ourProcess = Run (@ComSpec & " /c " & 'robocopy.exe ' & $sourcedir & ' ' & $destdir & ' /E /NJH /NJS /NDL /NC', @ScriptDir, @SW_HIDE, $STDOUT_CHILD)

ProgressOn("RoboCopy", "Copying Files...", "0%",-1,-1,18)

While 1
   If $ourProcess Then
      $charsWaiting = StdoutRead($ourProcess, 0 , 1)
      If @error = -1 Then
         $ourProcess = 0
            MsgBox(0, "App Exited", "Process has exited...")
         ContinueLoop
      EndIf
      If $charsWaiting Then
         $currentRead = StdoutRead($ourProcess)
         $fileinfo = StringRegExp($currentRead, '(.*?)([:alpha:]:.*\.[a-zA-Z]{3})',3)
         If IsArray($fileinfo) = 1 Then
             $filesize = StringStripCR(StringStripWS($fileinfo[0],8))
             $filename = $fileinfo[1]
         EndIf
         $percent = StringRegExp($currentRead, '([0-9]{1,3})(?:.[0-9]{1,3})(?:%)',3)
         If IsArray($percent) = 1 Then
         ProgressSet($percent[0],$percent[0]&"% "&@CRLF&"Filename: "&$filename&@CRLF&"Filesize: "&$filesize)
            EndIf
                If IsArray($result) Then
                    If StringInStr($result[0], "%") Then; Current line is a progress update line
                    $progress = StringTrimRight($result[0], 1)
                    MsgBox (4096,"Test", $progress)
                    ElseIf
                ElseIf
      EndIf
   EndIf
WEnd
ProgressOff()
Exit

Share this post


Link to post
Share on other sites

Here is what i came up with. Didn't know AutoIt at that time.. but it works..

_NL_FileProc.zip


Too lazy for anything other than AutoIT.

Share this post


Link to post
Share on other sites

Hello,

I'm new in autoit but I've downloaded "robocopy.zip", unpacked it and before modifying it (i.e. translate it in french), I'm trying to compile it from the source provided.

It does compile but the exe file has a filesize of 487Kb in place of 305Kb for the exe provided in the zip file.

More than this when executing this newly compiled exe, I get the following error...

AutoIt Error

Line 6731 (File ""):

Error: Duplicate function name.

Any idea ?

Regards.

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

AutoIt 3.2.0.1

Which AutoIt Version are you using? Since that release there have been several script breaking changes introduced... either compile with 3.2.0.1, or adjust the script yourself to the script breaking changes since then... Edited by KaFu

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0