1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Copy files from a text file from given a parameters in a .ini using VBScript

Discussion in 'Visual Basic ( VB )' started by AutosysR11, Apr 12, 2012.

  1. AutosysR11

    AutosysR11 New Member

    I was trying to resolve my issue in listing a files from a text file to another folder. The script open a file named ".ini" which contain a parameters. The script will use the parameters to copy all files from the list file.
    Dim export_file, item, path, extension
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objPath = objFSO.GetFolder(path)
    Set objNewFile = objFSO.CreateTextFile(export_file, True)
    sExtension = objFso.GetExtensionName(extension)
    Set colFiles = objPath.Files
                   For Each Item in colFiles
                   If objFSO.GetExtensionName(Item.Name) = sExtension Then 
                   objNewFile.WriteLine Item.Name
                   End If
    Last edited by a moderator: Apr 13, 2012

Share This Page