0
kaiwen21's Avatar, Join Date: Jul 2011
Newbie Member
Awesome script thanks

Is it possible however to split the filename into different columns in an excel table.

for e.g. the file is "001 - his name is known.mkv"

and want to split it as follows:
Column A: 001
Column B: his name is known

and drop the file extension from the file list
0
AutosysR11's Avatar
Newbie Member
Hello,

I am beginner in vbscript. Can someone help me to resolve my problem. I was trying to export all files in C:\windows with the file extension of .log and will list the file to Filelist.txt under the same path (c:\windows).
0
pramodmhn's Avatar, Join Date: Oct 2014
Newbie Member
I will do this way:
Set objFso = CreateObject("Scripting.FileSystemObject")
Set Folder = objFSO.GetFolder(".")
Set NewFile = objFSO.CreateTextFile(Folder&"\FileList.txt", True)
For Each File In Folder.Files
'sNewFile = File.Name'including extension
NewFile.WriteLine(left(File.Name,(len(File.Name)-4)))'exclude extenstion
Next