Removing all .txt files in a folder

I have a project were I want to log and store data into data log files, at start-up I want to remove all the files into a folder and re-start the logging process. I have tried to create a lynx script, but this does not work could any one advise the best way to remove these files from a folder:

rm /mnt/sd/*.txt
nano /root/
/bin/rm /root/*.log
chmod 755 /root/

brendonshaw: ```


rm /mnt/sd/*.txt ```

You almost have it. The first line is telling the command line interpreter to use Python to run this script. But the code that follows is not Python, it's a shell command.

sonnyyu has the right fix: change the shebang on the first line to have the shell interpreter run the script.