How to Create Short Path for Windows Folders or Directories | PeopleSoft Tutorial

How to Create Short Path for Windows Folders or Directories

Some applications or executable programs won’t execute or install because of presence of space in the path of the folder. For example, some of the executable or application programs cannot handle C:\Program Files location because of presence of space in “Program Files.” Also, sometimes, the entire path gets so long that it may run into issues with the total length of the path.

So, what is the solution?

Solution is to use Windows short paths or Windows short names. By default Windows has a feature to create short path for folders to resolve such of issues.

To list short path for folders in Windows, you need to run the command dir /x

For example, in the above picture, you can see that INTERN~1 is a short path for Internet Explorer. So, instead of using C:\Program Files\Internet Explorer, you can use C:\PROGRA~1\INTERN~1 (doing dir /x at the C drive location, I found that PROGRA~1 is short path for Program Files).

However, you can also see in the picture that the folder “Puppet Labs” does not have a short path yet and I need to use this path for some advanced level work with PeopleSoft DPKs. So, I need to create a short path for Puppet Labs.

How to Create Short Path for Windows Folders or Directories

This feature of creating short names in Windows is known as 8dot3 name

Step 1 — Verify if the feature to create short path is enabled or not. Run the command by invoking command prompt in administrative mode: fsutil 8dot3name query

If you get response like “Registry state is 1” then its disabled.
If you get response like “Registry state is 0” then its enabled. If it is disabled, then you need to enable it before you can create a short path.

Step 2 — If disabled, enable the short name feature using the command:

fsutil behavior set disable8dot3 0

Step 3 — To create new short path for a folder, you need to use a command with generic syntax:

fsutil file setshortname <Path> <Shortname>

Example : fsutil file setshortname “C:\Program Files\Puppet Labs” PUPPET~1

Now do a listing using dir /x  and you should be able to see the short name of your folder.

You are now set to use this short path. If you wish to, disable this feature again using the command”

fsutil behavior set disable8dot3 1

Apurva Tripathi

Apurva is a PeopleSoft consultant and a big advocate of everything PeopleSoft. He is also a technology enthusiast and loves learning and implementing newer and open source technologies. He spends his spare time updating this blog and likes to read books on self help and productivity.

  • Bobby Rosenbalm says:

    Another way to shorten the path and file name is LongPathTool.
    Works like a charm. Try it! Simple solution.

  • >