Microsoft Outlook automatically stores messages, contacts,
appointments, tasks, notes, and journal entries in one of the
following two locations: In a personal storage folder, also known as a
.pst file, on your hard disk drive. In a mailbox that is located on
the server. Your mailbox is located on a server if you use Outlook
with Microsoft Exchange Server.
所以,根据这些信息,你应该能够使用操作系统import os
下面的示例演示如何简单地使用scandir()来显示给定路径中不以“.”开头的所有文件(不包括目录)。这个entry.is_文件()调用通常不会进行额外的系统调用:
^{pr2}$
对于验证目录:
使用listdir(path)列出指定路径中的可用目录,添加进一步的逻辑,您应该能够实现您想要的
例如:import os
cdirs = os.listdir("C:/")
print(cdirs)
或创建一个函数来执行此操作:def file_check(path):
file_dirs = listdir(path)
#do something with this
return file_dirs