For example. I need to rename a file photo.jpg using the contents of a text file "whose.txt".
In all cases, the text file will only contain one word with no special characters or spaces only normal alphabetic letters.
For example: whose.txt could be the word "mypicture". Running the script would rename photo.jpg to mypicture.jpg and do it even if it overwrites an existing file with the name "mypicture.jpg".
I know this is probably something simple but it is late i can't think
I tried to set a variable to the contents of the text file then use the variable to rename the jpg file but can't get things in the right order to work.
In all cases, the text file will only contain one word with no special characters or spaces only normal alphabetic letters.
For example: whose.txt could be the word "mypicture". Running the script would rename photo.jpg to mypicture.jpg and do it even if it overwrites an existing file with the name "mypicture.jpg".
I know this is probably something simple but it is late i can't think

I tried to set a variable to the contents of the text file then use the variable to rename the jpg file but can't get things in the right order to work.








