B
B
bychok3002016-11-22 15:10:13
linux
bychok300, 2016-11-22 15:10:13

How to automatically send a file to a file sharing service?

The situation is this, for me, the .html file is automatically generated; I want to make the script determine if there is a new file in the folder, if there is, then send it to a file sharing service, for example, to dropmefiles.com, when sent, delete this file from the folder.
How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-11-22
@bychok300

How is the file generated? Add sending the file to where it is generated and that's it.
Why send to file hosting? Without a direct link to your file, it will be problematic to find it on a file hosting service, but where do you send the link?
You can send it with the curl command
You can delete it with the rm command
You can find it with the find command
If you want to have everything written ready for you - freelance.

D
Dmitry, 2016-11-22
@zmitrok62

Obviously, write a script and hang it on cron with the following logic:
do ls in the directory -> if there is a file on the output, then send it somewhere -> if successful, then delete it.
Or do you want straight bash code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question