Hi, the script only converts one file. Can you help me edit it for folder? Convert all files in the source folder to target folder (same file name as in the source folder). Thank you for your help.
Script:
inputFile = "D:\Folder\files_row_1_dmEncodedContent.blob"
outputFile = "D:\Folder2\files_row_1_dmEncodedContent.blob"
Set fso = CreateObject("Scripting.Filesystemobject")
Set input=fspenTextFile(inputFile,1)
contents = input.ReadAll()
input.Close
Set oXML = CreateObject("Msxml2.DOMDocument")
Set oNode = oXML.CreateElement("base64")
oNode.dataType = "bin.base64"
oNode.text = contents
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = 1 'adTypeBinary
BinaryStream.Open
BinaryStream.Write oNode.nodeTypedValue
BinaryStream.SaveToFile outputFile
Script:
inputFile = "D:\Folder\files_row_1_dmEncodedContent.blob"
outputFile = "D:\Folder2\files_row_1_dmEncodedContent.blob"
Set fso = CreateObject("Scripting.Filesystemobject")
Set input=fspenTextFile(inputFile,1)
contents = input.ReadAll()
input.Close
Set oXML = CreateObject("Msxml2.DOMDocument")
Set oNode = oXML.CreateElement("base64")
oNode.dataType = "bin.base64"
oNode.text = contents
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = 1 'adTypeBinary
BinaryStream.Open
BinaryStream.Write oNode.nodeTypedValue
BinaryStream.SaveToFile outputFile