delphidabbler / gbg

A Windows command line program to create a file of a given size, filled with garbage.
https://delphidabbler.com/software/gbg
MIT License
3 stars 0 forks source link

Add option to inhibit file overwriting confirmation prompt #12

Closed delphidabbler closed 2 months ago

delphidabbler commented 1 year ago

Suggesting two options:

  1. -o (lower case letter O) - Raise exception if file to be written already exists.
  2. -O (upper case letter O) - Silently overwrite any preexisting file.
delphidabbler commented 2 months ago

How about having single --overwrite=<param> command with 3 possible commands:

  1. ask - ask whether to overwrite (default)
  2. silent - overwrite without asking
  3. error - stop with error if file already exists

Could still have -o as alias for --overwrite=error and -O as alias for --overwrite=silent

delphidabbler commented 2 months ago

Not implementing long command names just yet, so sticking with -o and -O.