Replace Builtin commands with Custom Commands for CMD.exe

Solution 1:

Is there any way to replace cd and dir with other programs?

No, but you can come close - here's how:

  1. You can create a batch file called dir.cmd.

    @echo off
    setlocal
    echo I have replaced dir
    endlocal
    

    Example:

    F:\test>dir.cmd
    I have replaced dir
    
    F:\test>
    

    However you have to call it by its full name dir.cmd not just dir, unless…

  2. You can use doskey to redefine dir:

    doskey dir=dir.cmd
    

    Example:

    F:\test>dir
    I have replaced dir
    
    F:\test>