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.


Copy

normalwithin loop
copy [list]copy
Add files and directories to the clipboard. Previous content of the filesystem clipboard is flushed.

Copy To

normalwithin 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.

Copy To As

normalwithin 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.

Create

normalwithin loop
create [list]create
Create new empty files. If the name does not contain an extension, then a new directory is created instead.

Create Directories

normalwithin loop
createdirectories [list]createdirectory
createdirectory [string]createdirectory
Create new empty directories.

Create Files

normalwithin loop
createfiles [list]createfile
createfile [string]createfile
Create new empty files, regardless of whether their names contain an extension or not.

Delete

normalwithin 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.

Drop

normalwithin 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.

Hide

normalwithin loop
hide [list]hide
Set the attribute hidden to files and directories.

Lock

normalwithin loop
lock [list]lock
Set the attribute read-only to files and directories.

Move To

normalwithin loop
move [list] to [string]move to [string]
Relocate files and directories. Before using this command, it is recommended to read some remarks.

Move To As

normalwithin loop
move [list] to [string] as [string]move to [string] as [string]
Files and directories are relocated and renamed.

Open

normalwithin loop
open [list]open
Files and directories are opened using their opening default program.

Open With

normalwithin 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.

Reaccess To

normalwithin loop
reaccess [list] to [time]reaccess to [time]
Alter last access time of files and directories.

Rechange To

normalwithin 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.

Recreate To

normalwithin 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.

Remodify To

normalwithin loop
remodify [list] to [time]remodify to [time]
Alter last modification time of files and directories.

Rename To

normalwithin 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.

Select

normalwithin loop
select [list]select
Show files and directories selected in the default system file explorer. In Windows OS, File Explorer is used.

Unhide

normalwithin loop
unhide [list]unhide
Set the attribute not hidden to files and directories.

Unlock

normalwithin loop
unlock [list]unlock
Set the attribute not read-only to files and directories.