Guidance
指路人
g.yi.org
software / rapidq / Examples / File & Directory / fileops / Fileops.htm

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

  
Fileops
'========================================================================|
' Fileops is a set functions to manipulate file names and paths.         |
' QUOTE - Returns a quoted string                                        |
' STRIPPATH - Returns file path (without file name)                      |
' STIPFILENAME - Returns file name (without path)                        |
' STRIPFILEEXT - Returns file extension (like ".exe", ".html" etc.)      |
' FILENAMENOEXT - Returns file name without extension                    |
' FULLPATHNOEXT - Returns full path without file extension               |
'========================================================================|

$include "fileops.inc"

declare sub file_operations

create form as qform
       center
       width = 500

       create fl as qfilelistbox
       align = 3
       ondblclick = file_operations
       end create

       create re as qrichedit
       align = 5
       font.name = "Courier new"
       wordwrap = 0
       end create
showmodal
end create

sub file_operations
re.clear
dim sta as string
sta = fl.filename
re.addstrings "ORIGINAL FILE NAME" + chr$(9) + sta, _
              "QUOTED FILE NAME" + chr$(9) + quote(sta), _
              "FILE PATH" + chr$(9) + chr$(9) + StripPath(sta), _
              "FILE NAME" + chr$(9) + chr$(9) + stripfilename(sta), _
              "FILE EXTENSION" + chr$(9) + stripfileext(sta), _
              "WITHOUT EXTENSION" + chr$(9) + filenamenoext(sta), _
              "FULL NAME (NO EXT)" + chr$(9) + fullpathnoext(sta)
end sub


掌柜推荐
 
 
¥477.00 ·
 
 
¥918.00 ·
 
 
¥370.00 ·
 
 
¥271.00 ·
 
 
¥995.00 ·
 
 
¥1,580.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-06-05 14:03:16