Hello Experts -
I am familiar with looping in programming in general but I am a novice in python. I am trying to get my code to loop through a directory of MDBs and basically do compact and repair. I have the working code that does work for one file but I need it do it repeatedly for every file in the given directory.
The given directory would be a network path: \\fp1\rowp
def mdb_repair(mdb_path, msaccess='C:/Program Files/Microsoft Office/Office15/msaccess.exe'):
"""Repairs the mdb_path database using the msaccess utility."""
return subprocess.check_output([msaccess, '/compact', '/repair', mdb_path])
if __name__ == '__main__':