Windows 10: Correct way to copy a file to Desktop folder

Discus and support Correct way to copy a file to Desktop folder in Windows 10 Gaming to solve the problem; I can copy a file in Powershell to Desktop with the following command:PS C:\Users\user> Copy-Item test.txt $env:USERPROFILE\DesktopThis works, but if a... Discussion in 'Windows 10 Gaming' started by Stanley Quinn, Apr 22, 2025.

  1. Correct way to copy a file to Desktop folder


    I can copy a file in Powershell to Desktop with the following commandCorrect way to copy a file to Desktop folder :pS C:\Users\user> Copy-Item test.txt $env:USERPROFILE\DesktopThis works, but if a user enables OneDrive user folder backups, the Desktop folder location changes to this:$env:USERPROFILE\OneDrive\DesktopAs a result, the copy command fails.Is there a reliable way to reference a user's Desktop folder regardless of whether OneDrive sync is enabled for it?

    :)
     
    Stanley Quinn, Apr 22, 2025
    #1
  2. temp02 Win User

    Java.nio.file - Copying files

    You can't copy a folder, thats why it generates an exception (you are trying to copy a folder using a copy file function).
    You probably need to list all the files inside that folder and copy one by one
     
    temp02, Apr 22, 2025
    #2
  3. Wozzer Win User
    Java.nio.file - Copying files

    Issue was the above, so thanks temp02.
     
    Wozzer, Apr 22, 2025
    #3
  4. MohanC Win User

    Correct way to copy a file to Desktop folder

    windows 10 deleted my desktop files

    Step 1 - I upgraded to Win 10 and lost all my files on Desktop.

    Step 2 - Found the files in Network - USers- Desktop

    copied all files again to desktop.

    Step 3- Restarted my machine again and lost desktop files again.

    Step 4 - As suggested did the following as listed below but dont find my files.

    • Press “Windows + E”, open This PC/Computer
    • Open Local Disc C, open Windows.old
    • Click on Users, select your User name
    • Go to desktop folder
    Cant find my files. Why is Win 10 deleted files again and again from Desktop ?.
     
    MohanC, Apr 22, 2025
    #4
Thema:

Correct way to copy a file to Desktop folder

Loading...
  1. Correct way to copy a file to Desktop folder - Similar Threads - Correct copy file

  2. Correct way to copy a file to Desktop folder

    in Windows 10 Software and Apps
    Correct way to copy a file to Desktop folder: I can copy a file in Powershell to Desktop with the following command:PS C:\Users\user> Copy-Item test.txt $env:USERPROFILE\DesktopThis works, but if a user enables OneDrive user folder backups, the Desktop folder location changes to this:$env:USERPROFILE\OneDrive\DesktopAs a...
  3. Error Copying Outlook PST files to Box.com Desktop Folder

    in Windows 10 Gaming
    Error Copying Outlook PST files to Box.com Desktop Folder: Hello,I'm working with Win11 Pro.I am attempting to copy an Outlook PST file to my Box Desktop Sync Folder and I continue to receive the error that the file is either invalid, or the path is too long.I have run RegEdit and GPEdit.msc, enabling long paths in both cases....
  4. Error Copying Outlook PST files to Box.com Desktop Folder

    in Windows 10 Software and Apps
    Error Copying Outlook PST files to Box.com Desktop Folder: Hello,I'm working with Win11 Pro.I am attempting to copy an Outlook PST file to my Box Desktop Sync Folder and I continue to receive the error that the file is either invalid, or the path is too long.I have run RegEdit and GPEdit.msc, enabling long paths in both cases....
  5. File Copies in Folders

    in Windows 10 Network and Sharing
    File Copies in Folders: Using WIN not using One Drive -I made a new folder to copy certain documents into it to have a folder dedicated for a specific topic. I copied the files from one folder to the next. I made some changes to the names of the files. I closed the folder. When I reopened it later...
  6. File Copies in Folders

    in Windows 10 Gaming
    File Copies in Folders: Using WIN not using One Drive -I made a new folder to copy certain documents into it to have a folder dedicated for a specific topic. I copied the files from one folder to the next. I made some changes to the names of the files. I closed the folder. When I reopened it later...
  7. File Copies in Folders

    in Windows 10 Software and Apps
    File Copies in Folders: Using WIN not using One Drive -I made a new folder to copy certain documents into it to have a folder dedicated for a specific topic. I copied the files from one folder to the next. I made some changes to the names of the files. I closed the folder. When I reopened it later...
  8. Desktop icons not moving correctly into folders

    in Windows 10 Ask Insider
    Desktop icons not moving correctly into folders: Whenever I move a new desktop icon into a folder, the image of the icon does not load and will not load no matter how many times I move it in and out of that folder. This is not specific to one folder or one icon, and happens all the time. The icon inside the folder will only...
  9. Copy and pasting files and folders is way slower!!!

    in Windows 10 Network and Sharing
    Copy and pasting files and folders is way slower!!!: Recently I've disabled some of the preinstalled windows features such uninstalling Cortana and disabling windows media player! and I guess that it may be responsible for slowing down some of the features... I know that my device is capable of copying and pasting things at a...
  10. best way to copy files/folders from desktop to laptop?

    in Windows 10 Network and Sharing
    best way to copy files/folders from desktop to laptop?: Wanting to copy my desktop documents folder to my laptop when there is already a documents folder on my laptop. https://answers.microsoft.com/en-us/windows/forum/all/best-way-to-copy-filesfolders-from-desktop-to/06a5a886-9808-4959-9064-12200860237f"