Hi there. I made a Web2py app. This app create pdf reports, which are opened by the Web Browser. The pdf files are saved in Download folder of the user. Is there any way to delete these files from Download directory? I tried several ways and I get <class 'PermissionError'> [WinError 5] Denied access:in 'c:\\Users\\xxxxx\\Downloads' . The app runs behind IIS server.
The code i'm using in a controller is: sistema = platform.system() if sistema == "Windows": rutaDescargas = Path(r"c:\Users\xxxx\Downloads") archivosRecibos = rutaDescargas.glob("*.pdf") for archivo in archivosRecibos: os.remove(archivo) xxx represents the name of user on compuer user The app is running in a small office, in internal network, no Internet server. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/32e5d178-fe8c-40a0-88a0-6807bfeb5210n%40googlegroups.com.