Reputation: 133
Ok so I have a python script that will move its self to the desktop when its run, but I want it to be able to move itself no matter what its name is. My current code only moves it when it is called a specific thing.
My current code is
shutil.move("moveMe.py", "C:/Users/" + user + "/desktop/")
I've experimented with __ name__ because from what its name implies it would be the name of the file but I'm not 100% sure how to use it yet as I'm quite new to python
Upvotes: 0
Views: 72