getting the Real name of CDs from RR
Alejandro Tejada
capellan2000 at yahoo.com
Sat Jan 1 11:02:49 EST 2005
on Thu, 30 Dec 2004
Ken Ray wrote:
>Did you try the Win98 version I'd posted this
morning?
>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
temp
> return last word of line 1 of temp
> else
-- Win98, etc.
> put pLetter & cr & "dir" into
url("file:c:/temp.bat")
> put shell("c:\temp.bat") into tResult
> delete file "c:/temp.bat"
> return last word of line 6 of temp
> end if
>end GetCDName
Hi, Ken
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
url("file:c:/temp.bat")
put shell("c:\temp.bat") into tResult
delete file "c:/temp.bat"
return line 6 of tResult
end GetCDName
>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!!! :-)
al
=====
Visit my site:
http://www.geocities.com/capellan2000/
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
More information about the use-livecode
mailing list