-1

So I made an HWID Spoofer with python! Here's an example:

import urllib.request
urllib.request.urlretrieve(url, 'C:/Program Files/changer.bat')
urllib.request.urlretrieve(url, 'C:/Program Files/mac_changer.py')

My main python program is in desktop. Now, I need to call the bat file and other necessary python files from a different directory. How do I do that??

I have tried os.system - tho it works only for the current directory only so does the exec command!

Please help!

4
  • 2
    Does this answer your question? Fetch a file from a local url with Python requests?
    – user12867493
    Jul 7, 2020 at 16:30
  • Does this post answer your question? Jul 7, 2020 at 16:31
  • @Daniil Thanks for the quick reply unfortuantely no :-(
    – SDG8
    Jul 7, 2020 at 16:35
  • @BalajiAmbresh Thank for the real quick reply, I believe that answered my question, I'll give it a try now :-)
    – SDG8
    Jul 7, 2020 at 16:35

1 Answer 1

0

Try running os.chdir(path) before youre running os.system os.chdir changes the working directory.

example:

os.chdir("C:/Program Files/");
os.system("changer.bat");
1
  • I'm gonna give that a quick try and tell you :-)
    – SDG8
    Jul 7, 2020 at 16:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.