# set-file command

The set-file BASIC program creates or
updates the synonym-defining item called qfile in the master dictionary
of the current account.

Warning: Using the set-file command overwrites any existing non-D-pointer items.

## Syntax

```
set-file {account.name{file.name}} {alternate.name}
```

## Description

This provides access to the
specified file name in the specified *account.name* by using the file name, qfile, in place of
the file name parameter during any file-handling commands.

If
an *alternate.name* is supplied, then the MD is updated
with that name (instead of qfile).

Each
time set-file is invoked, it overwrites the previous
Q-pointer.

The same functionality can be achieved using path
names.

## Example(s)

```
set-file dm bp
’qfile’ updated.
list qfile
```

## See also

- [File reference (Access Query Language)](https://d3codex.com/access/file-reference-access-query-language/)
- [Synonym-defining items](https://d3codex.com/definitions/synonym-defining-items/)

---
Source: https://d3codex.com/tcl/set-file-command/ - part of the D3Codex reference.
