Alternatively, you could install Cygwin and use 'ls' for everything ;-)

Dan


On Mon, Dec 3, 2012 at 8:36 AM, Daniel Klein <[email protected]>wrote:

> SYSTEM(1017) returns 'UNIX' or 'WINNT' so I would use that.
>
> Dan Klein
>
>
> On Mon, Dec 3, 2012 at 7:51 AM, Charlie Noah <[email protected]> wrote:
>
>>   I have a program that I want to make platform independent between
>> Windows and Unix. It needs to get a folder/directory listing (Windows -
>> dir, Unix - ls) so it needs to know what OS it's on.
>>
>> Executed "hostname" returns XP on my XP box (I don't know what it returns
>> on other Windows or Unix/AIX/Linux)
>>
>> SYSTEM(1017) returns WINNT on my XP box (I don't know what it returns on
>> others Windows or Unix/AIX/Linux)
>>
>> Environment variable JBCDEV_BIN result contains \ on Windows, / on Unix
>> (very kludgy)
>>
>> What methods do you use to determine what OS you're on?
>>
>> Thanks,
>> Charlie Noah
>>
>> Tiny Bear's Wild Bird Store
>> Home of "Safety Net Shipping"
>> http://www.TinyBearWildBirdStore.com
>> Toll Free: 1-855-TinyBear (855-846-9232)
>>
>>    --
>> --
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>
>> To post, send email to [email protected]
>> To unsubscribe, send email to [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/jBASE?hl=en
>>
>>
>>
>>
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en



Reply via email to