Send command and log file from smartphone to pc desktop

I would like to create an application on an Android smartphone that is able to send short strings (of commands) or even complete files of important length (log files) to a fixed PC, connected inside an office
Both the smartphone and the office PC are connected on the internet
What is the most effective system, and the code to use, to obtain this transmission of information?
Thank in advance

If you run a web server on the PC, you can use the Web component in App Inventor to make GET/POST requests to the PC. It has functionality for sending both text and files.

So Android can write / read on any db server using a web server and a procedure capable of receiving / sending the command
Thank you very much

But what if the office pc should communicate with the single Android phone?
I mean without using the polling technique from telephone to office pc to test semaphores like variables
How can I send commands from the office PC directly to the telephone (commands that can be recognized by the App Inventor)?