- OS: Windows 03 server
- Python ver: 2.7
In the code below, its runs are fine when I replace " fuchida@domain.com " with "fuchida". If I use the email format for the directory name, I get the following error: WindowsError: [Error 123] Invalid file name, directory or volume name:. Please let me know what I can do to make this work, my money is on the @ symbol, but I donβt know how to enable it in python.
import os def dirListing(): dirList = os.listdir("C:\\Program Files\home\Server\Logs\ fuchida@domain.com ") for fname in dirList: print fname return def main(): dirListing() if __name__ == '__main__':main()
source share