From WikiChip
Difference between revisions of "mirc/commands/remove"
m (Bot: de-linking old mIRC menu) |
(→Example) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{mirc title|/remove Command}} | {{mirc title|/remove Command}} | ||
| − | The '''/remove | + | The '''/remove''' command can be used to delete a file permanently or sends it to the recycle bin. The filename cannot be a wildcard pattern. This command prints "* Removed '<filename>'", to avoid that message, use the dot prefix (i.e. use /.remove). |
== Synopsis == | == Synopsis == | ||
| Line 9: | Line 9: | ||
== Parameters == | == Parameters == | ||
| − | * '''<filename>''' - the file to remove | + | * '''<filename>''' - the file to remove. Your filename can be case-insensitive, but cannot include ?* wildcards. In the absence of a full path, filenames are assumed to be relative to $mircdir. If the <filename> contains any spaces, it must be enclosed in quotes. |
| + | |||
| + | Note: If filename contains 2+ consecutive spaces, this command searches for a filename without the duplicate space, and deletes that file instead, if it exists. | ||
== Example == | == Example == | ||
| − | <syntaxhighlight lang="mIRC">; | + | <syntaxhighlight lang="mIRC"> |
| + | ; Create and write to a file | ||
/write foo.txt Hello There | /write foo.txt Hello There | ||
| − | ; | + | ; Remove the file |
| − | /remove foo.txt</syntaxhighlight> | + | /remove foo.txt |
| + | |||
| + | ; Delete a filename containing space from downloads subfolder | ||
| + | //.remove $qt(downloads\test filename.txt) | ||
| + | </syntaxhighlight> | ||
| + | '''Note:''' The dot prefix hides both the success message and the "no such file" error. | ||
== Compatibility == | == Compatibility == | ||
Latest revision as of 17:58, 23 August 2025
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /remove command can be used to delete a file permanently or sends it to the recycle bin. The filename cannot be a wildcard pattern. This command prints "* Removed '<filename>'", to avoid that message, use the dot prefix (i.e. use /.remove).
Synopsis[edit]
/remove -b <filename>
Switches[edit]
- -b - Send the file to the recycle bin
Parameters[edit]
- <filename> - the file to remove. Your filename can be case-insensitive, but cannot include ?* wildcards. In the absence of a full path, filenames are assumed to be relative to $mircdir. If the <filename> contains any spaces, it must be enclosed in quotes.
Note: If filename contains 2+ consecutive spaces, this command searches for a filename without the duplicate space, and deletes that file instead, if it exists.
Example[edit]
; Create and write to a file /write foo.txt Hello There ; Remove the file /remove foo.txt ; Delete a filename containing space from downloads subfolder //.remove $qt(downloads\test filename.txt)
Note: The dot prefix hides both the success message and the "no such file" error.
Compatibility[edit]
Added: mIRC v4.0
Added on: 20 Mar 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
- List of commands
- List of identifiers
- $mircdir
- $scriptdir
- $read
- $findfile
- $finddir
- /copy
- /mkdir
- /rename
- /rmdir
- /run
- /write
mIRC commands list