Can't read txt file on nucleo f303k8

I think you can’t open any file form your PC directly. The device can listen to the serial, where an application on the PC side is reading the file and sending the data.