Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickBackup application

Overview

This is command line utility to backup (zip) current folder. All the code is 100% generated by Github Copilot Agent. So, this software is double-purpose project:

  • to test Github Copilot Agent
  • to have a better quick backup tool

Command line arguments

archive_name exclusions_file_name.txt primary_backup_folder [secondary_backup_folder]

What it does step by step

  • reads name of the parent folder. For example, if application was started in c:\temp, the name is "temp". This is archive subfolder name.
  • in the primary backup folder (3rd argument), create primary target subfolder matching archive subfolder name unless it is already exists.
  • in that primary target subfolder, create archive zip file by adding ".zip" to the archive name (1st argument)
  • reads exclusions file (2nd argument). This file contains regular expressions defining files and folder to exclude from the archiving. It can contain lines like ^bin$ and .zip$
  • enumerates all folders and files
  • exclude all folders and files matching regular expressions from the exclusions file
  • for all the remaining folders, repeat recursively
  • zip all the remaining (i.e., not excluded) enumerated files and filders into the target zip file
  • if 4th argument (secondary target) is provided, and the target folder is available, create there secondary target subfolder (unless already exists) and copy there the zip file from the primary target. This operation shall be wrapped in try-catch, since secondary target might not be connected or available.

More instructions

Implement QuickBackup application according to the description in readme.md. Ask questions if requirements are not clear. Try not adding any additional nuget packages.

More instructions

You can use exclusions.txt. you can test the applicaztion with arguments: 0a exclusions.txt f:\QBackup h:\QBackup if you run it in the current folder C:\SRC\QuickBackup it shall create subfolder f:\QBackup\QuickBackup\0a.zip and then copy it to h:\QBackup\QuickBackup\0a.zip Please implement this code and run it

Result

Github Copilot Agent generated all the code from the above text in this readme file and it worked from the first attempt. The code is generated with GPT 4.1 LLM.

How do I use it

Create a file q.cmd like:

C:\Tools\QuickBackup\QuickBackup.exe %1 C:\Tools\QuickBackup\exclusions.txt f:\QBackup h:\QBackup

then type:

q <my_archive_version>

(For some reason I do not use timestamp as an achive version)

Why if there is GIT?

  • for quick one-off projects and prototypes which do not belong to GIT
  • for non-source code data which also does not belong to GIT

About

Backup current folder with configured exclusions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages