x:=ExtractFileName(str);  // Take file name + Extension , Does not contain file path
 y:=ExtractFileExt(str);   // Take the file extension

DELPHI Get more articles about file names and extensions

  1. C# Get the file name and extension

    C# Get the file name and extension string aFirstName = aFile.Substring(aFile.LastIndexOf("\\") + 1, (aFile.LastI ...

  2. C# Get the file name and extension 【 turn 】

    https://www.cnblogs.com/libushuang/p/5794976.html C# Get the file name and extension string aFirstName = aFile.Substring(a ...

  3. Asp.Net obtain FileUpload The file path of the control 、 file name 、 Extension

    string fileNameNo = Path.GetFileName(FileUploadImg.PostedFile.FileName); // Get the file name and extension string Directory ...

  4. os.path.splitext() usage -- Separating file names from extensions

    usage : os.path.splitext(“ File path ”)    Separating file names from extensions : Default return (fname,fextension) Tuples , Slice operation Example : import os path_01='E:\ ...

  5. Shell Example of getting the file name and extension of a file

    This article mainly introduces Shell Example of getting the file name and extension of a file , Concise code examples , It's easy to understand , Friends in need can refer to basename example.tar.gz .tar.gz # => examp ...

  6. “sgen.exe” Failed to run . The filename or extension is too long

    problem Cannot run after creating project severity Code explain project file That's ok Disable status error MSB6003 The specified task executable "sgen.exe" Failed to run .System.Component ...

  7. lua Get the file name and extension

    local str = "aaa.bbb.bbb.txt" -- Get the file name function getFileName(str) local idx = str:match(&quo ...

  8. asp Get the function code of the file name and extension

    <% ' Get the file name ( No extension ) Function getFilename(text)text = Left(text,inStrRev(text,".")-1)getFil ...

  9. _splitpath / _wsplitpath Split the absolute path into drive letters 、 route 、 file name 、 Extension .

    Today share the next path split API, A complete absolute path can be divided into : Disk character ( Including colons :) route ( Include the front & hinder \, No drive letter & file name ) file name ( No extension ) Extension ( Include the preceding .) Not to mention ...

Random recommendation

  1. MySQL- Use tcpdump screening MySQLl database tps Soaring problems

    You can export it directly tcpdump -i eth1 -s -l - | strings | perl -e ' while(<>) { chomp; next if /^[^ ]+[ ]*$/; ...

  2. OSPF Topology troubleshooting report

    OSPF Troubleshooting report Fault point one :PPP Link failure The fault phenomenon : R2 and R4 Between PPP Link for a while down For a while UP Fault analysis : 1)       ppp Whether the authentication types are consistent 2)       ppp chap For certification ...

  3. mongodb c api compile

    1. autoconf-latest.tar.gz http://ftp.gnu.org/gnu/autoconf/ tar xzvf autoconf-latest.tar.gz ./configu ...

  4. [ turn ]GET,POST,PUT,DELETE The difference between

    Link to the original text :http://blog.csdn.net/mfe10714022/article/details/39692305 Http Defines different ways to interact with the server , The most basic methods are 4 Kind of , Namely GET,P ...

  5. objectLiteral.js

    // 1. The addition of any parameter function add(){ var sum = 0 for(var i=0;i<arguments.length;i++){ if(!isNaN(argumen ...

  6. View device uuid The order of -blkid

      View device uuid The order of -blkid In connection with /etc/fstab It can be used when   [root@mapper ~]# blkid /dev/sda1: UUID="285510be-b19 ...

  7. 2019.01.14 bzoj2648: SJY Playing chess pieces (kd-tree)

    Portal kd−treekd-treekd−tree The template questions . Brief introduction : Support to insert a point on the plane , Find the nearest point pair for a point . Ideas :cdqcdqcdq It's a good way to divide and conquer It's just like the yardstick is suffocating So I used it ...

  8. FuelPHP series ( Two ) ------ route route

    FuelPHP in , By default, you can use /controller_name/function_name This way to access , It can also be accessed through custom routing . Routing is configured in /fuel/app/config/routes ...

  9. Do you want to restore the page ?Chrome Not closed properly

    Google chrome Every time the browser opens " Do you want to restore the page " What do I do ? Google chrome Every time the browser opens " Do you want to restore the page " What do I do ? As shown in the figure below : Start Google every time you open it chrom ...

  10. MySQL Joint index test 3

    Follow up on the last article : http://www.cnblogs.com/xiaoit/p/4430387.html Sometimes a field will be indexed , But when I looked at the execution plan, I found that I still scanned the table ? You can force down the index to see ...