Core commands
Core commands provide main functionalities of the Perun2 language and are used to manipulate files and directories.
By default, a core command fails when it faces a filesystem path collision.
We can change that by some designated flags.
Boolean variable success describes the result of the previously performed command.
normal | within loop |
---|
copy [list] | copy |
Add files and directories to the clipboard. Previous content of the filesystem clipboard is flushed.
normal | within loop |
---|
copy [list] to [string] | copy to [string] |
Create copies of files and directories inside certain location. This is done without the use of the clipboard.
Before using this command, it is recommended to read some
remarks.
normal | within loop |
---|
copy [list] to [string] as [string] | copy to [string] as [string] |
Create copies of files and directories inside certain location. In addition, these elements are renamed.
normal | within loop |
---|
create [list] | create |
Create new empty files. If the name does not contain an extension, then a new directory is created instead.
normal | within loop |
---|
createdirectories [list] | createdirectory |
createdirectory [string] | createdirectory |
Create new empty directories.
normal | within loop |
---|
createfiles [list] | createfile |
createfile [string] | createfile |
Create new empty files, regardless of whether their names contain an extension or not.
normal | within loop |
---|
delete [list] | delete |
Move files and directories to the recycle bin. However, if they are on an external drive, the recycle bin cannot work and they will simply be deleted.
In this special case, the data is not overridden and it could be recovered be dedicated software.
normal | within loop |
---|
drop [list] | drop |
Delete files and directories harshly. They cannot be found inside the recycle bin after the process.
However, the data is not physically overridden and specialized software could be used to recover it.
normal | within loop |
---|
hide [list] | hide |
Set the attribute hidden to files and directories.
normal | within loop |
---|
lock [list] | lock |
Set the attribute read-only to files and directories.
normal | within loop |
---|
move [list] to [string] | move to [string] |
Relocate files and directories. Before using this command, it is recommended to read some
remarks.
normal | within loop |
---|
move [list] to [string] as [string] | move to [string] as [string] |
Files and directories are relocated and renamed.
normal | within loop |
---|
open [list] | open |
Files and directories are opened using their opening default program.
normal | within loop |
---|
open [list] with [string] | open with [string] |
Files and directories are opened using certain program.
The last argument can be the name of the executable file or its path.
normal | within loop |
---|
reaccess [list] to [time] | reaccess to [time] |
Alter last access time of files and directories.
normal | within loop |
---|
rechange [list] to [time] | rechange to [time] |
Alter inode change time of files and directories.
If certain operating system does not support this operation, then last modification time is altered instead.
normal | within loop |
---|
recreate [list] to [time] | recreate to [time] |
Alter creation time of files and directories.
If certain operating system does not support this operation, then last modification time is altered instead.
normal | within loop |
---|
remodify [list] to [time] | remodify to [time] |
Alter last modification time of files and directories.
normal | within loop |
---|
rename [list] to [string] | rename to [string] |
rename [list] to extensionless [string] | rename to extensionless [string] |
Rename files and directories. By default, missing extensions are automatically added to file names.
This setting can be turned off by the extensionless flag.
normal | within loop |
---|
select [list] | select |
Show files and directories selected in the default system file explorer. In Windows OS, File Explorer is used.
normal | within loop |
---|
unhide [list] | unhide |
Set the attribute not hidden to files and directories.
normal | within loop |
---|
unlock [list] | unlock |
Set the attribute not read-only to files and directories.