Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameFileCopy
Syntaxfilecopy [origin:<origin>] [destination:<destination>] (overwrite)
Short DescriptionCopies a file from one location to another.
Full DescriptionCopies a file from one location to another.

The starting directory is server/plugins/Denizen.

May overwrite existing copies of files.

Note that in most cases this command should be ~waited for (like "- ~filecopy ..."). Refer to Language:~waitable.

This command can be disabled by setting Denizen config option "Commands.Filecopy.Allow copying files" to false.
Related Tags<entry[saveName].success> returns whether the copy succeeded (if not, either an error or occurred, or there is an existing file in the destination.)
Usage Example
# Use to copy a custom YAML data file to a backup folder, overwriting any old backup of it that exists.
- ~filecopy o:data/custom.yml d:data/backup.yml overwrite save:copy
- narrate "Copy success<&co> <entry[copy].success>"
Groupfile
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/FileCopyCommand.java#L29