q check/load csv with file name including "-"

https://learninghub.kx.com/forums/topic/q-check-load-csv-with-file-name-including

I would like to load csv files and save it to kdb. Bute file name is like file-20230818.csv, which might not be recognized by q. How can I deal with the symbol “-”?

thanks

Use `$ to cast a string to a symbol

https://code.kx.com/q/ref/cast/

 

`$":file-with-dash.csv"

 

 

thanks a lot. that works