1.

Solve : Trying to batch delete line 3 from many .cvs files?

Answer»

We receive from our CLIENTS, thousands of Excel.csv files. Because of the the processes we RUN them through we NEED to open each file and manually delete line 3 from each file. It is very time intensive. What we do after we delete the 3rd line we resave the file in the same folder with a 2_ prefix to the file name. Is there any way to batch process these files to do this automatically? Appreciate any help anyone can give me. THANKS, SJK You can CERTAINLY accomplish this with many different batch processing tools. Personally, I would recommend Python.

This is a very similar question to yours, with example code. The only change you would need to make, is to have the program write to a different filename, rather than the original.

https://stackoverflow.com/questions/4710067/using-python-for-deleting-a-specific-line-in-a-file

I hope this information helps.......I'm sorry, I've never made one of these batch files before and I don't understand the steps either. I'd need the instructions dumbed down quite a bit. Thanks for any help that anyone is willing to offer.For starters you can download Python from the Windows Store. (I'm assuming you're using Windows 10?)

https://www.microsoft.com/en-us/p/python-37/9nj46sx7x90p?activetab=pivot:overviewtab



Discussion

No Comment Found