Answering my own question
> -----Original Message----- > [mailto:[EMAIL PROTECTED] On Behalf Of Sherlock, Ric > I was thinking that I could call the winapi function > GetShortPathName for my filename before I give it to: > wd 'winexec "cmd /C ',filename,'" sw_hide' > > I'm struggling to get the calling syntax right though. From > win32api.dat: > kernel32 GetShortPathName i *c *c i > > >From MSDN: > <http://msdn2.microsoft.com/en-US/library/aa364989.aspx> > > fln=: 'd:\Folder with spaces\File with spaces.xls' > 'GetShortPathName'win32api fln;(,' ');#fln > |domain error > | 'GetShortPathName'win32api fln;(,' ');#fln > The problem is that the actual functions in kernel32.dll are called GetShortPathNameA (ANSI) and GetShortPathNameW (Unicode). So I think the declaration in win32api.dat is wrong. It should be kernel32 GetShortPathNameA i *c *c i And maybe also: kernel32 GetShortPathNameW i *c *c i ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
