1

I'm new in programming and started making simple scripts to automate some of the tasks here in our office. So basically we have a separate computer in our office connected through the office network where we store backups of our files every day after business hours. I wanted to create a python script that can automate the backing up of files where it first checks the space on the computer first before proceeding to back up our files.

Unfortunately based on the forum, the os.statvfs does not work in windows platform. The wmi module works but only the local disks mounted to the computer were detected.

    import os

    disk = os.statvfs("/")


s = os.statvfs("\\\\LVD001-Backup\\")
AttributeError: module 'os' has no attribute 'statvfs'

LVD001-Backup is the name of the PC in the network where we store our office files.

martin
  • 11
  • 2
  • Please refer this. https://stackoverflow.com/a/4260249/3213745 – Sandun Madola Jul 11 '17 at 06:15
  • Welcome to [se]. That's a great first question (so upvoted). I'd suggest that you [edit] it to add some WMI or Windows-specific tags so an expert who follows those tags see your question. I love Python but I don't use it for Windows-specifc programming (I usually use PowerShell for this kind of task). Best of luck with it. – Anthony Geoghegan Jul 11 '17 at 09:35

0 Answers0