Why do folders like “My Pictures” come back after I delete them?

Raymond Chen

Some people are offended by the special folders like “My Pictures” and “My Music” and delete them, only to find them being re-created. What’s going on?

Windows itself is okay with you deleting those folders. Some corporations, for example, remove those folders from their employees’ machines because they don’t want the employees looking at pictures and listening to music while on the job. (Go figure.) And if the folder is deleted, Windows doesn’t try to bring it back.

However, any program can ask for the folder to be re-created. For example, if a program passes the CSIDL_FLAG_CREATE to the SHGetFolderPath function, then Windows will create the specified folder if it doesn’t exist. Similarly if it passes pass fCreate = TRUE to the SHGetSpecialFolderPath function.

If it really troubles you, you can set a creation audit on the My Pictures folder and see which program is re-creating it.

0 comments

Discussion is closed.

Feedback usabilla icon