# `hsym`

_Symbols to file or process symbols_
```syntax
hsym x     hsym[x]
```

Where `x` is a symbol atom or vector, returns the symbols prefixed with a colon, except those that already begin with one.
```q
q)hsym`c:/q/test.txt                / file path to symbolic file handle
`:c:/q/test.txt
q)hsym`10.43.23.197                 / IP address to symbolic handle
`:10.43.23.197
q)hsym `host:port`localhost:8001    / hostname to symbolic handle
`:host:port`:localhost:8001

q)hsym `abc`:def`::ghi
`:abc`:def`::ghi
```

`hsym` returns the null symbol unchanged.
```q
q)hsym `
`
```

----

[`hopen`](hopen.md)


[File system](files.md),
[Interprocess communication](../how_to/io_and_communication/basics.md)
