Jump to content

RoboCopy GUI


Danny35d
 Share

Recommended Posts

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
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 months later...

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
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

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
Link to comment
Share on other sites

  • 10 months later...

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
Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 7 years later...

I have used robocopy but sorry I cant try another version of it. Yes its good that you have made a GUI version of it, earlier it felt like hacking or something. It does not provide long path name support. I started to look for other software and found that GS Richcopy works very well and it is simple to use, no reading manuals to use a software. It provides NTFS support, multi threaded file transfer, long path name support, email notification when transfer is done, and above all it does not require you to read a manual first then start using it like robocopy does! Hope it helped you all!

Link to comment
Share on other sites

  • 1 month later...

Its good that you have released the GUI version of robocopy, it was very difficult to use earlier. I will try this. By the way, I am currently using GS Richcopy 360 which solved all my problems related to file copying, it works for FTP transfer also. I will recommend you GS Richcopy 360. It is easy to use and provides lot of useful features. 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...