Search found 5 matches

by bluefire_xl
25 Oct 2016 15:48
Forum: DOS Batch Forum
Topic: Finding a substring in a file name
Replies: 3
Views: 3101

Re: Finding a substring in a file name

Thank you for the response.

I notice that it was returning the filename back if part of the string is found. Is their a way to determine the output by yes or no?
by bluefire_xl
20 Oct 2016 13:07
Forum: DOS Batch Forum
Topic: Finding a substring in a file name
Replies: 3
Views: 3101

Finding a substring in a file name

I have a series of file in a folder and I want to check if a specific string is in one of the file name. I was looking at findstr command but I think it only looks at the content of the file. Its like find "hold" in the file name holdings092516.txt should return true. I am a bit new to dos...
by bluefire_xl
29 Jan 2016 12:24
Forum: DOS Batch Forum
Topic: deleting multiple column headers in csv file
Replies: 4
Views: 4609

Re: deleting multiple column headers in csv file

If your header line is shorter than 1024 bytes and does not have any special characters in it, you can use this. set /p header=<%p%Student.csv echo %header% > %p%Student_%t%.csv findstr /v /c:"Student Group" %p%Student.csv >> %p%Student_%t%.csv This code works! Thank you so much!
by bluefire_xl
28 Jan 2016 11:01
Forum: DOS Batch Forum
Topic: deleting multiple column headers in csv file
Replies: 4
Views: 4609

Re: deleting multiple column headers in csv file

This is the code that I used: findstr /v /c:"Student Group" %p%Student.csv > %p%Student_%t%.csv This is my header format Student Group, Group Name. These headers repeat itself on every Student Group on the csv file. When I try to used the code above. It will delete all the header line entr...
by bluefire_xl
28 Jan 2016 09:55
Forum: DOS Batch Forum
Topic: deleting multiple column headers in csv file
Replies: 4
Views: 4609

deleting multiple column headers in csv file

I have a csv extract that have repeated header columns on it. The header shows up on every group data. Is there a way to just delete all other instance of that header and just retain the one on the top.

When I try to use findstr it will delete all of my columns.