phdit
asked on
Text file manipulation
Hi All,
I have the following text file which can contain thousands of lines each day.
Example
25,516582,B-003,C:\CAF\25- 00000103\2 5-00000001 .PDF
I need the script to read the first number 25 and the second number 516582 from each line (Thee numbers will be different on each line) and make the line look like below the only consistent thing about each line are the comma's.
25,516582,B-003,25_516582, 25-0000010 3\25-00000 001.PDF
Also need C:\CAF\ removing from each line
So from this
25,516582,B-003,C:\CAF\25- 00000103\2 5-00000001 .PDF
10,516983,B-003,C:\CAF\10- 00000103\1 0-00000003 .PDF
13,516972,N-102,C:\CAF\13- 00000103\1 3-00000004 .PDF
09,516940,N-102,C:\CAF\09- 00000103\0 9-00000005 .PDF
To This
25,516582,B-003,25_516582, 25-0000010 3\25-00000 001.PDF
10,516983,B-003,10_516983, 10-0000010 3\10-00000 003.PDF
13,516972,N-102,13_516972, 13-0000010 3\13-00000 004.PDF
09,516940,N-102,09_516940, 09-0000010 3\09-00000 005.PDF
Thanks
John H
I have the following text file which can contain thousands of lines each day.
Example
25,516582,B-003,C:\CAF\25-
I need the script to read the first number 25 and the second number 516582 from each line (Thee numbers will be different on each line) and make the line look like below the only consistent thing about each line are the comma's.
25,516582,B-003,25_516582,
Also need C:\CAF\ removing from each line
So from this
25,516582,B-003,C:\CAF\25-
10,516983,B-003,C:\CAF\10-
13,516972,N-102,C:\CAF\13-
09,516940,N-102,C:\CAF\09-
To This
25,516582,B-003,25_516582,
10,516983,B-003,10_516983,
13,516972,N-102,13_516972,
09,516940,N-102,09_516940,
Thanks
John H
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.