digitaldebonaire
digitaldebonaire

Reputation: 31

python os.listdir() not displaying all of the files on my desktop

I am running windows 7 and using the idle interpreter. os.listdir() is not displaying all of the files on my desktop. This is the output I get when I run the command from idle:

    >>> os.listdir('C:\\Users\\Desktop') 
   ['CodeBlocks.lnk', 'Daily to Do - Shortcut.lnk', 'desktop.ini', 'DeSmuME', 
   'Google Chrome.lnk', 'idle.py', 'MilkShape 3D 1.8.4.lnk', 'Notepad++.lnk', 
   'PCSX2 1.2.1', 'ScpDriver - Shortcut.lnk', 'ScpMonitor - Shortcut.lnk', 
   'StarCraft II', 'Visual GBA', 'XAMPP Control Panel.lnk']

I have a bunch more shortcut files on the desktop such as Thunderbird, Blender, Unity3D, PaintShopPro, etc. They are not displayed when I run os.listdir(). I wish they were.

Any ideas as to why those shortcuts are not being displayed in the output?

Upvotes: 1

Views: 1060

Answers (1)

digitaldebonaire
digitaldebonaire

Reputation: 31

The files are actually not in C:\Users\\Username\Desktop, but in C:\Users\Public\PublicDesktop.

Upvotes: 1

Related Questions