ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# B.7 Basename Task to determine the basename of a specified file, optionally minus a specified suffix. When this task executes, it will set the specified property to the value of the last path element of the specified file. If file is a directory, the basename will be the last directory element. If file is a full-path, relative-path, or simple filename, the basename will be the simple file name, without any directory elements. Table B.9:聽Attributes NameTypeDescriptionDefaultRequired`property``String`Name of the property that is to be set.n/aYes`file``String`The path to take the basename of.n/aYes`suffix``String`The suffix to remove from the resulting basename (specified either with or without the ".").n/aNo B.7.1 Examples ``` <basename property="cmdname" file="./foo.exe" suffix=".exe"/> ```