Good morning folks,
just looking for a little help with working out code to append the contents of one fixed width text file to another fixed width text file, both files will have the exact same fixed width specifications.
The reason for doing this is combine the contents of two files that are output from a scanning system into one file should both files exist for onward transmission.
I have the following code which is missing the bit I need to append the contents of one text file to the other if both exist:
I've read up on some stuff I've found in this forum and on the internet generally and none seem to cover a specific file, but cover mulitiply files with various file names to a single file.
Any assistance would be most appreciated.
John
just looking for a little help with working out code to append the contents of one fixed width text file to another fixed width text file, both files will have the exact same fixed width specifications.
The reason for doing this is combine the contents of two files that are output from a scanning system into one file should both files exist for onward transmission.
I have the following code which is missing the bit I need to append the contents of one text file to the other if both exist:
Code:
[SIZE=3][FONT=Times New Roman][COLOR=green][COLOR=green] 'Checks to see if the retMail.txt file exists, if it does then[/COLOR][/COLOR][/FONT][/SIZE][COLOR=green]
[SIZE=3][FONT=Times New Roman][COLOR=blue]If[/COLOR][COLOR=#000000] FS.FileExists("B:\rtmail\rtmail.txt") = [/COLOR][COLOR=blue]True Then[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=blue] If [/COLOR][COLOR=#000000]FS.FileExists(“B:\rtmail.fof\rtmail.txt”) =[/COLOR][COLOR=blue] True Then[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=red]Code to append contents of rtmail.txt file in rtmail folder to contents of rtmail.txt file in rtmail.fof folder[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=blue]Else[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=green] 'Copy the Return Mail text file to the new Folder[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=#000000] FS.CopyFile "B:\rtmail\rtmail.txt", "B:\remail.fof\rtmail.txt"[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=green]‘Delete the rtmail.txt file from the rtmail folder[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=#000000] Kill “B:\rtmail\rtmail.txt”[/COLOR][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman][COLOR=blue]End If[/COLOR][/FONT][/SIZE]
[/COLOR]
I've read up on some stuff I've found in this forum and on the internet generally and none seem to cover a specific file, but cover mulitiply files with various file names to a single file.
Any assistance would be most appreciated.
John