I have a script to remove a backup file and it doesn’t work. All it contains is:
/file remove $backupfile
I have set all the permissions and still no joy. If I enter that command into the terminal it’s fine. Is this a limitation or am I doing something wrong?
Thanks
I’m sorry I don’t understand.
Script 1 - This script sets the variable using
:global backupfile ($backupname.“.backup”);
Script 2 - This script uses the variable to upload the file via FTP using the variable as the filename to upload. This works.
Script 3 - Tries to delete the file using the file name in the variable
/file remove $backupfile
So the variable is set as it works in Script 2. The content from Script 3 when run direct in terminal works. Maybe there is a restriction on letting scripts delete things?
When the global variable has been set in the first script, in a different script can I call it directly or do I have to read it and store it locally first?
Ok I understand what you are saying now. Works now thank you. I understood by reading the docs that the variable was already shared between scripts. And using the same script in terminal works. Anyway it’s all good now thanks.