# Write insertion format for File Drop in CotEditor on Mac

CotEditor has the following variables for the use of File Drop.

Variables for File Drop
Variable | Replaced with
--- | ---
`<<<ABSOLUTE-PATH>>>` | The absolute path of the dropped file.
`<<<RELATIVE-PATH>>>` | The relative path from your document to the dropped file.
`<<<FILENAME>>>` | The name of the dropped file with extension.
`<<<FILENAME-NOSUFFIX>>>` | The name of the dropped file without extension.
`<<<FILEEXTENSION>>>` | The file extension of the dropped file.
`<<<FILEEXTENSION-LOWER>>>` | The file extension of the dropped file (lowercase).
`<<<FILEEXTENSION-UPPER>>>` | The file extension of the dropped file (uppercase).
`<<<DIRECTORY>>>` | The directory of the dropped file.
`<<<FILECONTENT>>>` | The text content of the dropped file (works only when you drop an text file).
`<<<IMAGEWIDTH>>>` | The image width (works only when you drop an image file).
`<<<IMAGEHEIGHT>>>` | The image height (works only when you drop an image file).

Here are a few examples of what it’s like to use variables.

example 1) When you drop foo.html:
Insertion format you set | `<a href="<<<RELATIVE-PATH>>>"></a>`
The string actually inserted | `<a href="foo.html"></a>`

example 2) When you drop foo.jpg:
Insertion format you set | `<img src="<<<FILENAME>>>" width="<<<IMAGEWIDTH>>>" height="<<<IMAGEHEIGHT>>>" />`
The string actually inserted | `<img src="foo.jpg" width="160" height="80" />`

## See also

- Change Snippets settings