CINxxx.JPS

May 20, 2008
12,175
133
Syracuse, NY, USA
The command below leaves CINxxx.JPS in %TEMP.

Code:
( do c in @clip: ( echo %[c]%@execstr[grep %c i.txt | wc -l] ) ) | g:\gnu\sort -n -r --key=2,2 | head /n %cs
 
Last edited:
May 20, 2008
12,175
133
Syracuse, NY, USA
Simplified:
Code:
v:\> del t:\CIN464.JPS
Deleting T:\CIN464.JPS
     1 file deleted

v:\> echo 1^n2^n3 > clip:

v:\> ( do c in @clip: ( echo %c ) ) | head /n 2
1
2

v:\> del t:\CIN464.JPS
Deleting T:\CIN464.JPS
     1 file deleted
 

rconn

Administrator
Staff member
May 14, 2008
12,557
167
Same reason as the previous times you've asked this question - TCC cannot tell when the temporary clipboard file is no longer needed.

Your syntax is also the most inefficient way you could have done this - what you're doing is:
  1. Redirecting to a temporary file
  2. Reading from the temporary file and writing to the clipboard
  3. Reading the clipboard and writing to a temporary file
  4. Reading from the temporary file
Leave out "clip:" and it'll run a lot faster.