-3

I am very new to python and i need to check if file exists on remote windows machine using python . I have file with name demo.ps1 under c drive on remote windows machine ,is there something in python from which i can check if this file exists on machine

Ankur Sharma
  • 45
  • 3
  • 10
  • The remote machine's drive should be accessible from the other PC, for example by creating a share – zeevb Aug 23 '18 at 13:00
  • Possible duplicate of [How do I check whether a file exists?](https://stackoverflow.com/questions/82831/how-do-i-check-whether-a-file-exists) – Kalin Varbanov Aug 23 '18 at 13:03

1 Answers1

0

There's not really any universal cross platform way to check if a file exists remotely, so there's not builtin python modules to do this. If you have pywin32 installed, there may be ways, however: for instance, try the second method (netuse) mentioned in this answer:

https://stackoverflow.com/a/20367984/920545

Paul Molodowitch
  • 1,366
  • 3
  • 12
  • 29