Message53327
Logged In: YES
user_id=1053197
Device filenames can be detected by creating an empty
directory, and testing whether the filename exists in that
directory:
> md c:\empty
> if exist c:\empty\lpt1.txt echo foo
foo
> if exist c:\empty\lpt1.txt\lpt1.txt echo foo
foo
> if exist c:\empty\harmless echo foo
>
But note:
> if exist c:\empty\c:\lpt1.txt echo foo
> if exist c:\empty\:\lpt1.txt echo foo
>
I don't know why filenames containing ':' are treated
differently, but it might be wise to strip any ':' characters
from the path first.
|
|
Date |
User |
Action |
Args |
2007-08-23 16:01:43 | admin | link | issue481171 messages |
2007-08-23 16:01:43 | admin | create | |
|