USERNAME folder missing, after accidentally moving Downloads folder to Users in C: drive

This and this is the actual problem, with the %UserProfile% folder renamed to Download and I cannot change it: screenshot1

  • I'm also not able to access the %UserProfile%\Download folder from This PC: Screenshot2
4

1 Answer

You don't need a new account. Your profile folder accidentally acquired the desktop.ini file associated with the Downloads folder. The desktop.ini file specifies the dispay name and custom icon.

  1. Open Explorer to C:\Users like in your first screenshot.

  2. <Shift>+<RIght-click> in the background and select Open PowerShell window here.

  3. Type gci -ad<Enter> to list directories. Most likely you'll see your UserProfile folder and not the Downloads folder. If so, precede.

  4. Type the following, substituting the profile folder name:

    (gi '<FolderName>').Attributes -= 'ReadOnly'

  5. That should turn off processing of the desktop.ini file and your profile folder should display it's true name once you close and re-open Explorer.

That should take care of the profile folder name issue.


The missing Downloads unnder This PC is a different matter. A drag-and-drop may have inadvertently merged it with your profile folder. Can you locate any files/folders you know were in Downloads and determine their current location?

See if either of these commands open your downloads folder (Type in Run... dialog or Explorer Address bar):

  • shell:Local Downloads
  • shell:Downloads

Will wait to see if first part works and wait for additional info...


Edit:

Looking at that error message, Explorer is looking for Downloads in its default location, and creating a folder named "Downloads" in your user profile folder should fix the error. Then locate the missing contents ( most likely in your user profile folder ) and move them to the newly-created folder.


Edit 2:

If you're sure of the status of the ReadONly attribute, eg. by viewing a directory listing (Rin the Modecolumn):

PS C:\...\keith>gci -ad Directory: C:\Users\keith
Mode LastWriteTime Length Name
---- ------------- ------ ----
d-r--- 1/21/2022 3:11 AM .dotnet
d----- 1/19/2022 6:05 AM .nuget
d----- 10/8/2020 7:33 PM .vscode
d-r--- 4/17/2021 11:48 PM 3D Objects

You can set the ReadOnly attribute for a folder using:

  • (gi <Path>) += 'ReadOnly' -- where path can be absolute, relative, or . to specify the current directory.

And clear it using:

  • (gi <Path>) += 'ReadOnly'

But if you're unsure of the state of the flag, use bitwise operations to set or clear an attrubute:

  • Set:

     (gi .).Attributes = (gi .).Attributes -bor [System.IO.FileAttributes]::ReadOnly
  • Clear:

     (gi .).Attributes = (gi .).Attributes -band ! [System.IO.FileAttributes]::ReadOnly
  • To list the [System.IO.FileAttributes] enumeration, use the seemingly naval-gazing method invocation:

     [System.IO.FileAttributes]::GetNames([System.IO.FileAttributes])
PS C:\> [System.IO.FileAttributes]::GetNames([System.IO.FileAttributes])
ReadOnly
Hidden
System
Directory
Archive
Device
Normal
Temporary
SparseFile
ReparsePoint
Compressed
Offline
NotContentIndexed
Encrypted
IntegrityStream
NoScrubData
PS C:\>
8

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like