Quantcast
Channel: How to create a folder in C:\ so that it has the same shortname as "C:\Program Files" would? - Super User
Viewing all articles
Browse latest Browse all 2

How to create a folder in C:\ so that it has the same shortname as "C:\Program Files" would?

$
0
0

Shortnames in NTFS is a compatibility feature for DOS systems which only support 8.3 file names (<8 character name>.<3 character extension>). We can get the shortnames of a files/folders in the current directory with dir /x.

"C:\Program Files" has the shortname "PROGRA~1". What should a folder be named so that it becomes "PROGRA~1" and "C:\Program Files" becomes "PROGRA~2"?

I tried "Program Filas", "Program Fil", "Program File" to no avail. I also tried setting the creation, modification, lastwrite times to something older with:

$(Get-Item "Program Filas").creationtime=$(Get-Date "01/01/2000 00:01 am")
$(Get-Item "Program Filas").lastaccesstime=$(Get-Date "01/01/2000 00:01 am")
$(Get-Item "Program Filas").lastwritetime=$(Get-Date "01/01/2000 00:01 am")

Viewing all articles
Browse latest Browse all 2

Trending Articles