2013-07-01 90 views
0

我有我想要分割所以前不同的文件名的名稱 Contents.js jQuery.10.1.js 的main.css分割使用的字符

誰能告訴我怎樣才能得到延伸部分,從這些文件如js或css .i正在使用split函數並使用。 charatcer但它不工作在jquery.10.1.js。

回答

2

使用正確的工具 - .GetExtensionName() - 作業:

>> Dim oFS : Set oFS = CreateObject("Scripting.FileSystemObject") 
>> Dim aTests : aTests = Split("Contents.js jQuery.10.1.js Main.css") 
>> Dim sFiNa 
>> For Each sFiNa In aTests 
>>  WScript.Echo sFina 
>>  WScript.Echo oFS.GetExtensionName(sFiNa) 
>> Next 
>> 
Contents.js 
js 
jQuery.10.1.js 
js 
Main.css 
css