Yes. I did this for you in python at https://onlinegdb.com/Cp84508o9:
File system:
.
\ main.py
\ YOUR_FILE
\ OTHER_FILE
(Example) Your file's content:
A text file I uploaded to Online GDB.
Hello, World!
Main.py's content:
Finput = open('YOUR_FILE','r').read()
F = open('OTHER_FILE','a')
F.write(Finput)
F.close()
print(open('OTHER_FILE','r').read())
Output:
A text file I uploaded to Online GDB.
Hello, World!
:)