Creating multiple output files

Pipelines v1.6

 

.* Example by TenFiftyTwo(c).

Home

 
.* The following pipeline reads the file: example.txt, and creates 9 duplicate copies of the file.
.* Each copy is named: 'example%.txt', where '%' is the number 1 to 10 respectively.
.* The Copy pipeline launched by the Runpipe stage command performs the actual file copy, this
.* pipeline simply launches the Copy pipeline with name of the input and output files.
 
pipe literal /&installdrive:\&installpath\Examples\Input\/              .* Input path.
     | duplicate 9                                                      .* Make 9 additional copies.
     | specs /"/ 1 1-* n /example.txt/ n /"/ n                          .* Input filename.
             .* Output filename.
             /"/ nw /&sysdrive:\Documents and Settings\&username\My Documents\example/ n
             recno strip n /.txt/ n /”/ n
 
     .* Run the Copy pipeline.
     | runpipe "&installdrive:\&installpath\Examples\Handle arguments\Copy.ppl"
     | specs /Output file:/ 1 ws /"/ w-1 nw                             .* Tell the user the name..
     | cons                                                             .* ..of the file created.