<!-- /* Font Definitions */ @font-face {font-family:"MS 明朝"; panose-1:2 2 6 9 4 2 5 8 3 4; mso-font-alt:"MS Mincho"; mso-font-charset:128; mso-generic-font-family:roman; mso-font-pitch:fixed; mso-font-signature:-1610612033 1757936891 16 0 131231 0;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:Century; panose-1:2 4 6 3 5 7 5 2 3 3; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:"/@MS 明朝"; panose-1:2 2 6 9 4 2 5 8 3 4; mso-font-charset:128; mso-generic-font-family:roman; mso-font-pitch:fixed; mso-font-signature:-1610612033 1757936891 16 0 131231 0;} @font-face {font-family:"/@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0mm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:Century; mso-fareast-font-family:"MS 明朝"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:99.25pt 30.0mm 30.0mm 30.0mm; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:18.0pt;} div.Section1 {page:Section1;} -->
1 、 获 取当前 时间 ,使用 GetLocalTime 函数,然后按照你的需要 处 理成 对应 的字符串
2 、使用 CreateDirectory 创 建文件 夹 , 传 入完整的文件 夹 路径,比如你当前文件 夹为 C:/A ,你要 创 建文件 夹 B , 则传 入 C:/A/B/
3 、 创 建文件有多 种 方法,比如 fopen 、 CreateFile 等。
使用 GetFileOpenName
li_rtn = GetFileOpenName("Select File", &
docpath, docname, "PDF", &
+ "PDF Files (*.PDF),*.PDF," &
+ "Doc Files (*.DOC),*.DOC," &
+ "All Files (*.*), *.*", &
"d:/", 18)
IF li_rtn < 1 THEN return
ls_filename = string(docpath)
The following example displays a Select File dialog box that allows multiple selection. The file types are TXT, DOC, and all files, and the initial directory is C:/Program Files/Sybase. The option flag 18 specifies that the Explorer-style dialog box is used (2^1 = 2), and the Read Only check box is hidden (2^4 = 16). The selected filenames are displayed in a MultiLineEdit control.
string docpath, docname[]
integer i, li_cnt, li_rtn, li_filenum
li_rtn = GetFileOpenName("Select File", &
docpath, docname[], "DOC", &
+ "Text Files (*.TXT),*.TXT," &
+ "Doc Files (*.DOC),*.DOC," &
+ "All Files (*.*), *.*", &
"C:/Program Files/Sybase", 18)
IF li_rtn < 1 THEN return
li_cnt = Upperbound(docname)
for i=1 to li_cnt
mle_selected.text +=
string(docpath)+"/"+(string(docname[i]))+"~r~n"
next
In the following example, the dialog box has the title Open and displays text files, batch files, and INI files in the Files of Type drop-down list. The initial directory is d:/temp. The option flag 512 specifies that the old-style dialog box is used and the Network button is hidden (2^9 = 512).
// instance variables
// string is_filename, is_fullname
int li_fileid
if GetFileOpenName ("Open", is_fullname, is_filename, &
"txt", "Text Files (*.txt),*.txt,INI Files " &
+ "(*.ini), *.ini,Batch Files (*.bat),*.bat", &
"d:/temp", 512) < 1 then return
li_fileid = FileOpen (is_fullname, StreamMode!)
FileRead (li_fileid, mle_notepad.text)
FileClose (li_fileid)