id = "mtools"
name = "mtools"
homepage = "https://www.gnu.org/software/mtools/"
description = "A collection of utilities to access MS-DOS disks from Unix."
executables = ["mcopy", "mdir", "mformat"]
[dotfiles]
paths = ["~/.mtoolsrc"]
exclude = []
secret = []
side_effect = false
[commands]
format = 1
label = "Copy files (mcopy)"
description = "Copy files between Unix and an MS-DOS disk or image with mcopy. Only the text-mode and overwrite options are offered; recursive and other flags are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "manual"
kind = "manual"
url = "https://www.gnu.org/software/mtools/manual/mtools.html"
revision = "2026-10"
evidence = """
mcopy [-bspanvmQT] [-D clash_option] sourcefile targetfile
mcopy [-bspanvmQT] [-D clash_option] sourcefile [ sourcefiles… ] targetdirectory
mcopy [-tnvm] MSDOSsourcefile
Text (ASCII) file transfer. Same as t above.
Text (ASCII) file transfer with character set conversion. Differs from -a in the ASCII also translates incoming PC-8 characters
If the target file already exists, and the -n option is not in effect, mcopy asks whether to overwrite the file
"""
[[commands.field]]
id = "source"
label = "Source"
description = "Files to copy. A drive letter such as a: marks an MS-DOS side."
type = "string"
position = 0
min = 1
multiple = true
sources = ["manual"]
[[commands.field]]
id = "target"
label = "Target"
description = "Target file or directory; a drive letter such as a: marks an MS-DOS side."
type = "string"
position = 1
min = 1
sources = ["manual"]
[[commands.field]]
id = "ascii"
label = "Text transfer (CR/LF conversion)"
type = "boolean"
option = ["-a"]
sources = ["manual"]
[[commands.field]]
id = "no_confirm"
label = "No confirmation when overwriting Unix files"
type = "boolean"
option = ["-n"]
effect = "overwrite"
sources = ["manual"]
[[commands.task]]
id = "copy"
label = "Copy files"
fields = ["source", "target"]
required = ["source", "target"]
[[commands.task]]
id = "copy_text"
label = "Copy as text"
fields = ["source", "target", "no_confirm"]
required = ["source", "target"]
set = { ascii = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["source", "target"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["ascii", "no_confirm"]