1.    21 May 2017 #1
    Join Date : Jul 2015
    Pacific Northwest, USA
    Posts : 381
    Win10 x64 Pro -2 desktops, 1 laptop

    How to copy files with reserved names?

    I use an encryption & password protection program with an export function that creates file names containing "CON.". No problem if I just want to export and import the files, but I cannot copy the exported files. An attempt results in an invalid handle error. I assume that is because CON is a reserved name in Windows. I can't do anything about the file names being created. A display of the folder properties shows 60,383 files, 117 folders. Obviously File Explorer has no trouble reading the nested directories - even with their reserved names. Is there any way I can copy this stuff?
      My ComputerSystem Spec
  2.    21 May 2017 #2
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    Short of booting into another OS, you can enable the Linux subsystem for Windows and use Bash, but it’s CLI not GUI. If you regularly find yourself in the need to copy from this folder though you might want to do this and setup a shell script.
      My ComputerSystem Spec
  3.    21 May 2017 #3
    Join Date : Jul 2015
    Posts : 3,714
    10 Pro

    You can also use unlocker to rename or move files with restricted names (but not copy them).

    According to here you should be able to use the //?/ syntax but while you can create files with restricted names you can't then rename or delete them. Not sure if it is a bug or not.

    PS C:\Windows\system32> new-item \\?\C:\temp\con.txt -type file
        Directory: \\?\C:\temp
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    -a----        21-May-17     13:00              0 con.txt
    PS C:\Windows\system32> rename-item \\?\C:\temp\con.txt newname.txt
    rename-item : Cannot rename because item at '\\?\C:\temp\con.txt' does not exist.
    At line:1 char:1
    + rename-item \\?\C:\temp\con.txt newname.txt
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Rename-Item], PSInvalidOperationException
        + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RenameItemCommand
    PS C:\Windows\system32>
      My ComputerSystem Spec
  4.    23 May 2017 #4
    Join Date : Jul 2015
    Pacific Northwest, USA
    Posts : 381
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter

    Quote Originally Posted by lx07 View Post
    You can also use unlocker to rename or move files with restricted names (but not copy them).
    I hadn't used Unlocker for about 4 years and forgot (or maybe never knew) it could move and delete files with reserved names. This didn't provide me with a solution for the questions I asked, but it provided a solution to a more important question: If I find an alternative to the encryption and password protection program I'm using, how do I get rid of all those files with reserved names?

    Since you provided me with that solution, and since VeraCrypt does everything I need from the other program does, and since VeraCrypt seems to be supported while the other program (Everstrike's Protect Folder) seems to not be supported, I've switched. I no longer need the "export" folder full of reserved names so I deleted it.

    In the process of deleting the files I discovered that Unlocker has problem. While deleting those 60,000 files with reserved names, programs with multiple windows - some programs using .NET to manage multiple displays, for example - could not have their windows closed, moved, resized, etc. I have no idea what the interaction is, but it happened on 2 PCs so I don't think it was a fluke.
      My ComputerSystem Spec


Similar Threads
Thread Forum
System and reserved files use 70GB. How delete them?
Hello! Can any one help me. I was checking my storage on pc and find out that almost all GB are are used by system and reserved files, and it is more than 70GB. How can I delete these files? Thanks ...
General Support
Solved Data files not saving correctly [File names but zero byte files]
I have a problem with a program not saving preset data. Possibly due to harlink extenstion with only one piece of software. I use symbolic hardlinks on my system but I do not know if the following has any bearing on the issue with the software I...
Software and Apps
Files names not displaying
I am using Windows 10 and Office 2013 When I Open several workbooks at once and select the Excel Icon on the task bar, the workbooks appear as Excel, but displays no names. When I click any of the workbooks showing as Excel only , the name will...
General Support
I reserved a free copy of Windows 10 yesterday, how do long do I wait?
It says days or weeks , any estimate when Microsoft will give me the free copy of Win 10?
General Support
File explorer chinese files names and phantom files.
When I launch file explorer and get the home view, it is showing a bunch of filenames in Chinese characters (see attached screenshot) which it says are in the desktop folder. However there are no such files when I look at the desktop folder. WTF? ...
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:05.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App

Windows 10 Forums