{"id":17806144,"url":"https://github.com/letalys/convertfrom-robocoplog","last_synced_at":"2026-04-19T07:36:10.001Z","repository":{"id":259617057,"uuid":"876964769","full_name":"Letalys/ConvertFrom-RobocopLog","owner":"Letalys","description":"A Powershell Robocopy Log Parser.","archived":false,"fork":false,"pushed_at":"2024-11-04T22:03:39.000Z","size":137,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T09:45:32.953Z","etag":null,"topics":["powershell","powershell-script","powershell-scripts","robocopy","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Letalys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-22T21:13:13.000Z","updated_at":"2024-11-04T21:58:23.000Z","dependencies_parsed_at":"2025-08-13T09:34:26.054Z","dependency_job_id":"8e172969-9200-4ee4-9d98-246d42a06e20","html_url":"https://github.com/Letalys/ConvertFrom-RobocopLog","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"5110e699941142ef434cd6734ac4462d16ee2f77"},"previous_names":["letalys/convertfrom-robocoplog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Letalys/ConvertFrom-RobocopLog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Letalys%2FConvertFrom-RobocopLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Letalys%2FConvertFrom-RobocopLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Letalys%2FConvertFrom-RobocopLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Letalys%2FConvertFrom-RobocopLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Letalys","download_url":"https://codeload.github.com/Letalys/ConvertFrom-RobocopLog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Letalys%2FConvertFrom-RobocopLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274595760,"owners_count":25314019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","powershell-script","powershell-scripts","robocopy","windows"],"created_at":"2024-10-27T13:04:22.022Z","updated_at":"2026-04-19T07:36:09.952Z","avatar_url":"https://github.com/Letalys.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image info](./Robocoplog_banner.jpg)\n\n# ConvertFrom-RobocopLog : Universal Robocopy Log Parser\n\n`ConvertFrom-RobocopLog.ps1` is a powerful PowerShell tool designed to analyze log files generated by Robocopy, providing a clear and structured overview of file copy operations. \nIt converts logs into information-rich PowerShell objects, facilitating automation, reporting, and analysis of data transfers.\n\nThis script supports various Robocopy log formats with different log options, including those with full or partial file paths.\n\n- Detailed extraction of header information (source, destination, options).\n- Complete analysis of copied, modified, error, or ignored files.\n- Processing of overall statistics (number of files, bytes, errors) with the possibility of calculating the total processing time.\n- Flexible filtering options through parameters to include or exclude file and directory classes for parsing.\n- **Raw data extraction**: With the `-RawParsing` option, users can retrieve unprocessed log lines for further customization or external analysis.\n- **Verbose output**: Enhanced progress tracking and diagnostic output with `Write-Verbose`, available by specifying the `-Verbose` flag.\n\nThis script is ideal for system administrators looking to better understand or automate the management of Robocopy operations in complex environments, while maintaining an accurate view of performance and results.\n\n## Prerequisites\n\nTo use ConvertFrom-RobocopLog.ps1, you must ensure that your environment meets the following prerequisites:\n\n- **Operating system:** Windows with PowerShell (version 5.1 or later).\n- **Robocopy:** The log file must be generated by a Robocopy command with the log generation option enabled (e.g., `/LOG`, `/UNILOG`).\n- **Permissions:** You must have the necessary permissions to read the specified log file.\n- **Full file paths:** For analysis, Robocopy should be run with the `/fp` (Full Path) option to log full file paths.\n- **Show Class:** For analysis, Robocopy should be run **without** the `/nc` (Class not logged) option.\n\nFor French logs, use the `/unilog` option instead of `/log`.\n\n## How to use ConvertFrom-RobocopLog\n\n### First Way: Use `ConvertFrom-RobocopLog.ps1` file directly\n\nTo use ConvertFrom-RobocopLog.ps1, specify the Robocopy log file to analyze using the required `-RoboLog` parameter. The script will parse the content and return a structured PowerShell object containing the header information, processed files, and summary statistics.\n\n- `-RoboLog` : Path to the Robocopy log file to analyze (required).\n- `-LogLanguage` : Log language (optional, possible values: \"en-US\" or \"fr-FR\", default \"en-US\").\n- `-IncludeFileClass` : File classes to include in the parsing (optional, default \"All\").\n- `-ExcludeFileClass` : File classes to exclude from the parsing (optional).\n- `-IncludeDirClass` : Directory classes to include in the parsing (optional, default \"All\").\n- `-ExcludeDirClass` : Directory classes to exclude from the parsing (optional).\n- `-RawParsing` : Enables output of unprocessed log lines, bypassing structured parsing (optional).\n\n### Second Way: Use the internal function and integrate it into your own scripts\n\nYou can copy/paste the function `ConvertFrom-RobocopLog { ...}` and either declare it in your script or create your own `.psm1` module to integrate it without polluting your script.\n\nThe settings are completely identical.\n\n## Examples of Use\n\nComplete analysis of a log file in English (default):\n```\n$LOG = .\\ConvertFrom-RobocopLog.ps1 -RoboLog \"C:\\Logs\\RobocopyLog.txt\"\n```\n\nAnalysis of a log file in French with specific directory classes excluded:\n```\n$LOG = .\\ConvertFrom-RobocopLog.ps1 -RoboLog \"C:\\Logs\\RobocopyLog.txt\" -LogLanguage fr-FR -ExcludeDirClass \"NewDirs\"\n```\n\nAnalysis excluding all file and directory classes (only header and summary will be parsed):\n```\n$LOG = .\\ConvertFrom-RobocopLog.ps1 -RoboLog \"C:\\Logs\\RobocopyLog.txt\" -ExcludeFileClass \"All\" -ExcludeDirClass \"All\"\n```\n\nRaw data extraction mode for unprocessed log lines:\n```\n$LOG = .\\ConvertFrom-RobocopLog.ps1 -RoboLog \"C:\\Logs\\RobocopyLog.txt\" -RawParsing\n```\n\n### Object Properties\n\n1. `HeaderInfo`: Contains log header information.\n\t- `Start` : Start date and time.\n\t- `Source` : Transfer source.\n\t- `Destination` : Destination of the transfer.\n\t- `Files` : File criteria.\n\t- `Options` : Options used with Robocopy\n\n**Exemple**\n\n```\n$LOG.HeaderInfo.Start      # 2024/09/25 08:14:10\n$LOG.HeaderInfo.Source     # C:\\SourceFolder\\\n\n$LOG.HeaderInfo | Format-List\n\n######\nStart        : 2024/09/25 08:14:10\nSource       : C:\\SourceFolder\\\nDestination  : C:\\DestFolder\\\nFilesOptions : *.*\nOptions      : *.* /V /X /TS /FP /S /E /COPYALL /PURGE /MIR /NP /R:1000000 /W:30\n\n```\n\n2. `Files`: Contains information about processed files according to their class\n\t- `New`,`Same`,`Newer`,`Older`,`Modified`,`Lonely`,`Tweaked`\n    \t- `FilePath` : Full path of file\n        - `FileSize` : With `/byte` or with default Robocopy unit (m, g, t, ..)\n        - `TimeStamp`\n\t- `Failed` : Contains the list of files with error.\n    \t- `FilePath` : Full path of file\n        - `ErrorInfo` : Code error\n        - `ErroAction` : Indicates what action was attempted (Copy, Delete, etc.)\n\t- `Destination` : Destination of the transfer.\n\t- `Files` : File criteria.\n\t- `Options` : Options used with Robocopy\n\n**Exemple**\n\n```\n$LOG.Files.Extra\n\n######\nFilePath                        FileSize Timestamp\n--------                        -------- ---------\nC:\\SourceFolder\\LargeFile_1.dat 1.0 g    25/09/2024 14:11:56\nC:\\SourceFolder\\LargeFile_2.dat 1.0 g    25/09/2024 14:12:00\n\n$LOG.Files.New | Out-GridView\n$LOG.Files.Failed\n\n######\nFilePath                         ErrorInfo           ErrorAction\n--------                         ---------           -----------\nC:\\SourceFolder\\LargeFile_10.dat ERROR 32 0x00000020 Copying File\nC:\\SourceFolder\\LargeFile_11.dat ERROR 32 0x00000020 Copying File\nC:\\SourceFolder\\LargeFile_12.dat ERROR 32 0x00000020 Copying File\n\n```\n\n3. `Dirs`: Contains information about processed Directory according to their class\n\t- `New`, `Extra`, `Lonely`\n    \t- `Dirpath`\n        - `ItemCount` : Count Inner Directory Object (-1 if Deleting)\n        \n**Exemple**\n\n```\n$log.Dirs.New[0].DirPath      # \"C:\\SourceFolder\\NewDirectory\\\"\n\n```\n\n4. `SummaryInfo`: Overall summary of operations.\n\t- `Dirs` : \n    \t- `Total`, `Copied`, `Skipped`, `Mismatch`, `Failed`, `Extras`.\n\t- `Files` : \n    \t- `Total`, `Copied`, `Skipped`, `Mismatch`, `Failed, `Extras`.\n\t- `Ended` : End date and time.\n\t- `TotalTimeFromInnerLog` : Total duration calculated from Header et Summary Data Date.\n\t- `TotalTimeFromFile` : Total duration calculated from log file metadata\n\n**Exemple**\n\n```\n$LOG.SummaryInfo\n\n######\nDirs                  : @{Total=2; Copied=1; Skipped=1; Mismatch=0; Failed=0; Extras=1}\nFiles                 : @{Total=18; Copied=3; Skipped=15; Mismatch=0; Failed=0; Extras=2}\nEnded                 : 2024/09/25 08:25:10\nTotalTimeFromInnerLog : 00d:00h:00m:00s\nTotalTimeFromFile     : 00d:00h:53m:45s\n\n$LOG.SummaryInfo.Files.Skipped     # 15\n\n```\n\n## Supported Robocopy Log language, Options and FileClass\n\n### Language\n\n|Language | Comments                                                      |\n|---------|:--------------------------------------------------------------|\n|English  | By Default, can use with `/log` option from robocopy command. |\n|French   | By Default, can use with `/unilog` option from robocopy command. Needed to handle accents |\n\n### Add Your Language KeyWord\n\nJust add Your Language CultureMap From the variable `$CultureMap = @{...}`.\nThen remember to add your language option to the function and/or script parameter.\n\n```\n[Parameter(Mandatory = $false)]\n[ValidateSet(\"en-US\", \"fr-FR\")]\n[String]$LogLanguage = \"en-US\",\n```\n\n### Options (Non-exhaustive list)\n\n**This section covers the options that Robocopy must use to generate its log in order to be analyzed by RobocopLog** \n*For more information about Robocopy options click on the link: [Microsoft Learn : Robocopy](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy)*\n\n**JOB Options** : Not tested.\n\n|    Options   | Supported   | Microsoft Description                                         |\n|:------------:|:-----------:|:--------------------------------------------------------------|\n|/xf           | no\t     | Excludes files that match the specified names or paths. Wildcard characters (* and ?) are supporte    |\n|/nc           | no\t     | Excludes directories that match the specified names and paths.     |\n\n|Log Options   | Supported   | Comments                                                                                | Microsoft Description                                         |\n|:------------:|:-----------:|:----------------------------------------------------------------------------------------|:--------------------------------------------------------------|\n|/fp           | yes\t     | **Mandatory** : FullPath need to be generated for bein captured by parsing              |Includes the full path names of the files in the output.       |\n|/nc           | no\t     | **Forbidden** : Class need to be generated during log because they are used for parsing |Specifies that file classes aren't to be logged.               |\n\n|Log Options   | Supported   | Recommended* | Microsoft Description |\n|:------------:|:-----------:|:------------:|:----------------------|\n|/log+         | **no**      |      -       |Writes the status output to the log file (appends the output to the existing log file).|\n|/unilog+      | **no**\t     |      -       |Writes the status output to the log file (appends the output to the existing log file).|\n|/unicode      | **no**\t     |      -       |Displays the status output as unicode text.   |\n|/v            | yes         |      yes     |Produces verbose output, and shows all skipped files.|\n|/ts           | yes\t     |      yes     |Includes source file time stamps in the output.|\n|/byte         | yes\t     |      yes     |Prints sizes as bytes.|\n|/ns           | yes\t     |      no      |Specifies that file sizes aren't to be logged.|\n|/np           | yes\t     |      yes     |Specifies that the progress of the copying operation (the number of files or directories copied so far) won't be displayed. |\n|/ndl          | yes\t     |      no      |Specifies that directory names aren't to be logged.|\n|/nfl          | yes\t     |      no      |Specifies that file names aren't to be logged.|\n|/njh          | yes\t     |      no      |Specifies that there's no job header.|\n|/njs          | yes\t     |      no      |Specifies that there's no job summary.|\n|/x            | yes\t     |      yes     |Reports all extra files, not just the ones that are selected.|\n\n\\* ***Note** : Recommended for Optimal Analysis*\n\n### Robocopy Files Class Information\n\n#### English\n```\nFile        Exists In   Exists In        Source/Dest     Source/Dest    Source/Dest\nClass       Source      Destination      File Times      File Sizes     Attributes\n=========== =========== ================ =============== =============  ============\nLonely      Yes         No               n/a             n/a            n/a\nTweaked     Yes         Yes              Equal           Equal          Different\nSame        Yes         Yes              Equal           Equal          Equal\nChanged     Yes         Yes              Equal           Different      n/a\nNewer       Yes         Yes              Source \u003e Dest   n/a            n/a\nOlder       Yes         Yes              Source \u003c Dest   n/a            n/a\nExtra       No          Yes              n/a             n/a            n/a\nMismatched  Yes (file)  Yes (directory)  n/a             n/a            n/a\n```\n\n#### French\n\n```\nClasse de   Existe dans Existe dans      Source/Dest     Source/Dest    Source/Dest\nFichier     la Source   la Destination   Date fichier    Taille fichier Attributs\n=========== =========== ================ =============== =============  ============\nSolitaire   Oui         Non              n/a             n/a            n/a\nTweaked *   Oui         Oui              Identique       Identique      Différent\nIdentique   Oui         Oui              Equal           Identique      Identique\nModifié     Oui         Oui              Equal           Different      n/a\nPlus récent Oui         Oui              Source \u003e Dest   n/a            n/a\nPlus ancien Oui         Oui              Source \u003c Dest   n/a            n/a\nSupplément. Non         Oui              n/a             n/a            n/a\nDiscordance Yes (Fic)   Yes (Rép)        n/a             n/a            n/a\n```\n \\* ***Note** : Tweaked is KeyWord used for french too.*\n\n## Releases\n\n- Version `1.0`  | 2024-09-26\n- Version `1.01` | 2024-09-27\n\t- Bug fix : When the $ParseType option was full, the end summary was not correctly parsed due to a bad condition\n- Version `2.0`  | 2024-10-27\n\t- *Issue #2* : New Method to browse log file. This script now integrate the log file into an array and browse it.\n- Version `2.1`  | 2024-11-03\n\t- *Issue #4* : Integration of parameters for selecting file and directory classes to return in the object. \n\t- Removal of the ParseType option in favor of new options allowing you to exclude the recovery of file or directory classes to only manage the header and summary.\n- Version `2.2`  | 2024-11-03\n\t- *Issue #7* : Add RawParsing Option to return the raw data of the file classes without structuring them.\n\t- Add Write-Verbose to follow the progress of the script When the -Verbose parameter is used.\n\t- Update the help section to include the new RawParsing parameter and the new behavior of the script.\n\n## Links\n- [https://github.com/Letalys/ConvertFrom-RobocopLog](https://github.com/Letalys/ConvertFrom-RobocopLog)\n\n\n## Autor\n- [@Letalys - Christophe GOEMAERE (GitHUb)](https://www.github.com/Letalys)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletalys%2Fconvertfrom-robocoplog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletalys%2Fconvertfrom-robocoplog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletalys%2Fconvertfrom-robocoplog/lists"}