I'm writing a Python script, here's the part of the script that does not work.
command = "mv " + cwd + sys.argv[2] + " wallpaper.jpg" + " ~/Pictures/Wallpapers/"
print(command)
subprocess.run(command.split(" "))
If I copy and paste the command printed from the script in the terminal it works, but when called from my Python script I get the error:
mv: target '~/Pictures/Wallpapers' is not a directory
What's causing this?
If needed, I'm using Python 3.8.10 and Ubuntu 20.04.3.