.bat Batch file to delete first row of data

jfarc

Active Member
Joined
Mar 30, 2007
Messages
316
Before I get an input file into Excel for further execution, I need to have a *.bat command file do 2 simple things:

1) Append 1 existing .csv file to another existing .csv file - I have this command line in the *.bat as 'TYPE FILE1.CSV>>FILE2.CSV' and it works fine.

But,

2) I first need to edit the 'FILE1.CSV' and delete the first row of data(the column headings) before I Append the 2 files.

Does anyone know the *.Bat file command line to do this?

This user does not have access to Excel, but they are the only one that has access to the original data files. Otherwise, I'd do this easy Append in Excel, but can't.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi jfarc,

Is there a reason you can't delete the unwanted row once the file's been imported into Excel? If you use a macro attached to a toolbar button, the macro could automate the deleteion - or even ignore the 1st row of the csv file.

Cheers
 
Upvote 0
Yes, I need to do this before it gets to a user with Excel.

The user with access to the raw data files does not have Excel and they also need to do further execution with the end result file as do the Excel users down the chain. I can't have a time delay by sending the files to the Excel users then back again to the first user.

In short, I need the row deletion done by a *.bat file command outside of Excel.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top