"File not found" when running 'mklink' DOS command

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Vigk2
Junior Member
Junior Member
Posts: 4
Joined: 2007-10-17, 08:21 UTC

"File not found" when running 'mklink' DOS command

Post by *Vigk2 »

Hi, I'm running TC 7.5a, on 32-bit windows Vista.
AFAK, TC's command line can run any DOS command (?). However, 'mklink' pops up a "File not found" dialog box, while 'dir', 'date' commands run fine.
The %comspec% variable does point to 'cmd.exe'.
What should I do ?
Thanks!
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Windows XP has no internal command or tool mklink. Windows Vista/7 have mklink command.

Anyway, its not a TC fault. Your cmd.exe also shouldn't know mklink command if you have XP installed.
Vigk2
Junior Member
Junior Member
Posts: 4
Joined: 2007-10-17, 08:21 UTC

Post by *Vigk2 »

My friend, how much vodka did you have before you wrote that :) (j/k)
My post said I'm running Vista, and I use mklink very frequently. Being able to use it in TC's command line will save me alot of time.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Where is your mklink.exe located?
I run junction.exe from the TC command-line frequently (under Win2K), and it is in C:\wuBIN\exDOS -- which is part of my modified PATH.

I can run all the binaries in C:\wuBIN -- which itself is a junction to GNU's UnxUtils, wbin folder.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Vigk2 wrote:My friend, how much vodka did you have before you wrote that :) (j/k)
My post said I'm running Vista, and I use mklink very frequently. Being able to use it in TC's command line will save me alot of time.
Pardon, I missed this line. :D
Balderstrom wrote:Where is your mklink.exe located?
Anyway, MKLINK is a command, not a file. So, there is no mklink.exe file, just internal command for cmd.exe (like DIR, RD or CD).

And, cmd.exe in Vista/7 should support this command. If you view file in Unicode, you'll see MKLINK string.

But you can't run internal commands of CMD within TC's command-line. You should use this command instead:

Code: Select all

cmd /k mklink ...
Or you may execute command with Shift+Enter (I suggest also to replace your Windows\noclose.pif with mine one - it may be used with Shift+Enter for all Windows versions).

Also, you may use NTFSLinks addon for TC in order to create junctions and hardlinks from TC with user-friendly interface.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

AH! Yes, cmd /c mklink ... (OR:

UserDefined (Command): em_mklink
  • Command: cmd /c mklink
  • Params: %A
TC Alias: mklink
Command: em_mklink

NOTE: How to create an em_xyz command ? By Paul Vansumsen

Replace /c with /k if you want the cmd window to stay open.
Post Reply