- OS: Windows server 03
- Python ver: 2.7
For the code below, its runs fine when I substitute "[email protected]" with "fuchida". If I use the email format for directory name I get the following error "WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect:" . Please let me know what I can do to get this to work, my money is on the "@" symbol fudging things up but I do not know how to resolve it in python so far.
import osdef dirListing():dirList = os.listdir("C:\\Program Files\home\Server\Logs\[email protected]")for fname in dirList:print fnamereturndef main():dirListing()if __name__ == '__main__':main()