getting the Real name of CDs from RR
capellan2000 at yahoo.com
Sat Jan 1 10:02:49 CST 2005
on Thu, 30 Dec 2004
Ken Ray wrote:
>Did you try the Win98 version I'd posted this
>If not, here it is again:
>function GetCDName pLetter
> set the hideConsoleWindows to true
> if the shellCommand is "cmd" then
> put shell(pLetter & " & dir") into temp
> if line 1 of temp is empty then delete line 1 of
> return last word of line 1 of temp
-- Win98, etc.
> put pLetter & cr & "dir" into
> put shell("c:\temp.bat") into tResult
> delete file "c:/temp.bat"
> return last word of line 6 of temp
> end if
Thanks a lot for posting this revised version! :-))
Your new version now works fine in my side:
function GetCDName pLetter
set the hideConsoleWindows to true
put pLetter & cr & "dir" into
put shell("c:\temp.bat") into tResult
delete file "c:/temp.bat"
return line 6 of tResult
>From the resulting line, i could get the full
CD name even if the name has spaces like "30 OCT 03"
But still, i do not understand why the engine
executed always the first part of the "IF"
statement: if the shellCommand is "cmd"...
when in fact the shellCommand is "command.com"
Thanks again and...
Happy New Year for every Developer of every
platform in every programming language
in this earth!!! :-)
Visit my site:
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
More information about the use-livecode