One way of doing it:
<cfif FindNoCase("windows",server.os.name)>
<!--- set slashchar to '\' or do windows stuff here --->
<cfelse>
<!--- set slashchar to '/' or do *nix stuff here --->
</cfif>
Also, I *think* that forward slashes are actually legal under windows
if you're dealing with relative paths (might be something to do with
the underlying java platform) - don't quote me though ;)
Vaughan.
On Tue, 10 Aug 2004 11:03:34 +1000, Tim Lucas <[EMAIL PROTECTED]> wrote:
> G'Morning.
>
> Just wondering, what's the best way to do a cross platform <cffile>
> after getting the file list from <cfdirectory>?
>
> i.e. How do I check the platform and append "/" or "\" accordingly?
>
> Code is below (and is missing the directory before the filename in the
> file attribute).
>
> -- tim
>
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/