Home > OS > I would like to ask a bat take value of certain columns in the CSV
I would like to ask a bat take value of certain columns in the CSV
Time:10-09
I would like to ask a bat in the value of the a few columns in the CSV, but CSV column has 43, take to 38, more than 26 qualified,, User ID, provinces, gender, age, date of registration, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33 112260, Inner Mongolia, male, 22201 1/2/6, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2 and q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, aa2, ab2, ac2, ad2, ae2, af2, hf-solvated ag2, ah2, ai2, aj2, ak2, al2
Below is my code, can take out some columns,, but beyond the limits, and find all make uncertain, a lot of data, and exclude o For/f "delims=" % % a in (' dir/b *. CSV) do ( For/f "tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 delims=," % % b in (' type "a" % % ') do ( Echo % % b, c % %, % % d, % % e, % % f, % % g, h % %, % % I, % % j, % % k, l, % % % % m, % % n % % o % % p % % q, and % % r, % % s, % % t, % % u, % % v, w, % % % % x, y % %, % % z, "aa" % %, % % 2, % % 3 & gt;> CSV. TXT
)
) pause
CodePudding user response:
Vba or VBS, to choose the right tools before working