Tim Baverstock
2005-Feb-15 18:41 UTC
[Samba] Solved: foo.bat works, but just 'foo' causes "not recognized as an internal ..."
Hi folks. First time posting. I've managed to puzzle the following out. I found a few other articles on the web that asked the same question, but my search terms didn't throw up an article with an answer, so I thought I'd write the following: Where s: is a samba share that otherwise works for read/write: ---------------------------------------------- S:\misc\logs>foo.bat 'foo.bat' is not recognized as an internal or external command, operable program or batch file. S:\misc\logs>echo @echo > foo.bat S:\misc\logs>foo.bat ECHO is on. S:\misc\logs>foo 'foo' is not recognized as an internal or external command, operable program or batch file. S:\misc\logs>set PATH=.;%PATH% S:\misc\logs>set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.cmd;.bat;.exe;.Bat;.BaT;.BAt;.baT;.bAt;.bAT S:\misc\logs>foo 'foo' is not recognized as an internal or external command, operable program or batch file. ---------------------------------------------- The file is created on the Unix side as 'foo.bat' - case preserved. Both 'FileMon' by SysInternals and setting the Samba log level to 7 or so, showed Windows looking for FOO"* (rather than FOO.* which is more what I'd expect), but one of the lines in the logfile said 'wcard=FOO"*' which suggested it knew it was a wildcard. It turns out that if I create FOO.BAT on Unix, running 'foo' on its own abruptly starts working. Shame it took me over three hours to reach this point. You'll notice the PATHEXT change - I had an inkling it was a case issue. So... the problem's that the share is 'case sensitive = Yes' and cmd.exe helpfully uppercases executable command names typed in without extensions, but I'm sure you all knew that anyway. Hopefully the various search engines will know about it too, henceforth. Other reading suggests that for my application, the share should be set 'case sensitive = No' 'preserve case = Yes'. Cheers, Tim _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger