En cours

Windows Shell script

Very simple requirement.

I need a windows .bat file with batch commands.

I have a text file that is attached. It has series of data that appears in 3 lines.

I need a output text file where every 3 lines are concatenated with a comma delimeter.

Suggested steps:

Read file line by line and loop

1) Set a variable with the first line

2) Substring the second line that has PatientId in it. Find the value between "[" and "]" and append to the variable with a comma as prefix

3) Substring the third line that has AcquisitionDate in it. Find the value between "[" and "]", Change the date format to read MM/DD/YYYY and append to the variable with a comma as prefix.

4) Send output to [url removed, login to view]

Repeat steps 1-4 through the end of the file and exit loop.

Input Example:

Line 1 - # dcmdump (1/1): C:\Users\FOLDER1\[url removed, login to view]

Line 2 - (0010,0020) LO [RJX-018-001] # 12, 1 PatientID

Line 3 - (0008,0022) DA [20111026] # 8, 1 AcquisitionDate

Output required:

C:\Users\FOLDER1\[url removed, login to view],RJX-018-001, 10/26/2011

Compétences : Script Shell

Voir plus : dcmdump windows, substring in c, substring find, substring c, substring 0 2, find a prefix, c substring, windows shell script, windows batch file shell script, example shell script, windows 2012, shell script, IMA, append shell, shell append, shell script csv, append line file, batch file read csv file, windows script shell, bat file change, series script, shell windows, prefix set, change windows, script steps

Concernant l'employeur :
( 2 commentaires ) Nashua, United States

N° du projet : #2356650

Décerné à :


I have experience in scripting, I can do this job.

50 $ USD en 1 jour
(1 Commentaire)