Next: , Previous: , Up: Dired Mode   [Contents][Index]


6.1.5 Copying Files

Command: Dired Copy File (bound to Dired: c)

This command prompts for a destination specification and copies the file on the line with the point. When prompting, the current line’s specification is the default, which provides some convenience in supplying the destination. The destination is either a directory specification or a file name, and when it is the former, the source is copied into the directory under its current file name and extension.

Command: Dired Copy with Wildcard (bound to Dired: C)

This command prompts for a name pattern that may contain at most one wildcard, an asterisk, and copies all the names matching the pattern. When prompting for a destination, this provides the Dired buffer’s directory as a default. The destination is either a directory specification or a file name with a wildcard. When it is the former, all the source files are copied into the directory under their current file names and extensions. When it is the later, each sources file’s substitution for the wildcard causing it to match the first pattern replaces the wildcard in the destination pattern; for example, you might want to copy "*.txt" to "*.text".

Hemlock Variable: Dired Copy File Confirm (initial value t)

This variable controls interaction with the user when it is not obvious what the copying process should do. This takes one of the following values:

t

When the destination specification exists, the copying process stops and asks the user if it should overwrite the destination.

nil

The copying process always copies the source file to the destination specification without interacting with the user.

:update

When the destination specification exists, and its write date is newer than the source’s write date, then the copying process stops and asks the user if it should overwrite the destination.


Next: Renaming Files, Previous: Expunging and Quitting, Up: Dired Mode   [Contents][Index]