It won't work if you are writing code for a Xilinx embedded system because
c:\directory is a Windows (or DOS) path (probably on your development host).
To access files on such embedded systems you need storage hardware (e.g. HDD, SD card) and an OS running on the system that provides drivers for hardware and the used file system(s).
If you need to transfer file data from your development host to an embedded system you can use a communication interface (e.g. UART/serial or network) and implement code to handle the transfer and process the received data.
I can't give further help because you did not gave us any information about your project (hardware and used system software). For such very specific requests it might be also better to ask in a dedicated forum like
Xilinx: Home - Community Forums[
^].