Dim strPath As String
strPath = "C:\Some folder\Some other folder\" 'don't forget the closing \!
Shell "cmd.exe copy /c """ & strPath & "*.txt"" """ & strPath & "Consolidated.txt""",0
Hello RichardSchollar,
It has been resolved. I'll figure it out.
Best regards,
grid
Sub CombineFiles() Shell Environ$("COMSPEC") & " /c Copy C:\temp\*.tmp C:\temp\CombinedFile.tmp"
End Sub
Sub CombineFiles2() c00 = "C:\temp\" ' the path
c01 = Dir(c00 & "*.tmp")
Do Until c01 = ""
c02 = c02 & vbCrLf & CreateObject("scripting.filesystemobject").opentextfile(c00 & c01).readall
c01 = Dir
Loop
CreateObject("scripting.filesystemobject").createtextfile(c00 & "_new.tmp").write c02
End Sub
Shell Environ$("COMSPEC") & " /c Copy C:\temp\*.tmp C:\temp\CombinedFile.tmp"
Shell "cmd.exe copy /c """ & strPath & "*.txt"" """ & strPath & "Consolidated.txt""",0
folder = ActiveWorkbook.Path & "\output"
Shell Environ$("COMSPEC") & " /c Copy " & folder & "\*.scr " & folder & "\CombinedFile.scr"