script which automatically publishs a new file in a specific directory