Instructions apply to Windows 11, Windows 10, Windows 8, and Windows 7.
To accomplish either, see below:
Open Control Panel.
One quick way to do this in newer versions of Windows is to search for it from the taskbar.
If you’re comfortable with thecommand line, there’s a faster way to get this done.
See theMore Help… section at the bottom of the page and then skip down to Step 4.
Select theAppearance and Personalizationlink.
SelectFile Explorer Options(Windows 11/10) orFolder Options(Windows 8/7).
In theAdvanced settingssection, locate theHidden files and folders category.
You should be able to see it at the bottom without scrolling.
There are two options within it.
Choose what you want to do:
SelectOKat the bottom.
If you donotsee a folder namedProgramData, then hidden files and folders are being hidden from view.
The same command can be run fromCommand Prompt.
The toggle is inView>Show>Hidden items.
Also, know that turning on hidden files and folders isn’t the same as deleting them.

Items that are marked as hidden are simply no longer visiblethey’re not gone.