Difference between revisions of "Copy"

From Scriptwiki
Jump to: navigation, search
 
m
 
Line 10: Line 10:
 
Copies C:\Program Files\mIRC\mirc.ini to a backup file and overwrites if it already exists.
 
Copies C:\Program Files\mIRC\mirc.ini to a backup file and overwrites if it already exists.
 
==See Also==
 
==See Also==
* [[remove|/remove]]
+
* [[remove|/remove]] - deletes a file
* [[rename|/rename]]
+
* [[rename|/rename]] - renames a file
 
[[Category:Commands]]
 
[[Category:Commands]]

Latest revision as of 19:52, 7 April 2008

Copies a file to another filename or directory.

/copy -ao <filename> <filename>

You can also use wildcards for the source filename, and a directory name for the destination.

  • The -o switch overwrites a file if it exists.
  • The -a switch appends the first file to the second one.

Example

/copy "C:\file.txt" "C:\file2.txt"

Copies file.txt to the same directory with filename file2.txt.

/copy -o "C:\Program Files\mIRC\mirc.ini" "C:\backup-mirc.ini"

Copies C:\Program Files\mIRC\mirc.ini to a backup file and overwrites if it already exists.

See Also