Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Unexpected result from InetMatchName

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Unexpected result from InetMatchName
#13588
Posted by: DougA 2012-03-23 23:06:30
Wrote some code to extract a file from a unix host, the file may or may not exist.
So used the InetMatchName with the "ONE" option to check it's existance.
However, when the file doesn't exist,   InetMatchName still returns a null value, and sets some of the values, not what I would expect.  When run with an existing file, good values are returned.

errorsFN = date('S')                                (file name has format of:  yyyymmdd,  20120323)
drop FileInfo FileInfo.
FileInfo = 'none'; FileInfo. = 'notset'

err = InetMatchName("FileInfo", errorsFN, "ONE")
consay(con1, "InetMatchName-errors '"err"'")
consay(con1, "  File Name: '"FileInfo"'")
consay(con1, "  File Size: '"FileInfo.0"'")
consay(con1, "  File Date: '"FileInfo.1"'")


err returned null value
FileInfo returned null value
FileInfo.0 returned  "20120323"    (the value of the requested file name)
FileInfo.1 returned "1 1 1980 7 0 0"  

Am I missing something here, or is there a bug in InetMatchName ?
Doug
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,360.00 ·
 
 
¥271.00 ·
 
 
¥880.00 ·
 
 
¥980.00 ·
 
 
¥890.00 编辑
 
 
¥918.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0