删除文本文件的第一行 [英] Delete first line of text file

查看:190
本文介绍了删除文本文件的第一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要删除我的文本文件的第一行一个cmd脚本。该方案是这样的:我从日常FTP txt文件,问题是它在顶部则文件的标题带有空白行。由于我自动导入文件到一个访问表时,空行引起了我的问题。

I need a cmd script that deletes the first line in my text file. The scenario is the following: I take a txt file from FTP everyday, the problem is that it comes with blank line at the top then the headers of the file. Since I'm importing that file automatically into an access table, that blank line is causing me problems.

所以,我需要删除空行并保存该文件的脚本。

So, I need a script that deletes the blank line and saves the file.

推荐答案

在Windows /命令提示符:

Windows/command prompt:

more +1 filename.ext > otherfilename.ext

这看似很正常,但看来这也是制表符转换成多个空格..
我需要导入到的Postgres之前删除制表符分隔文件的第一行。
失败归因于多个选项卡上空间的自动转换...

That seems to work fine, however it appears that this also converts tab characters into multiple spaces.. I needed to remove the first line of a tab-delimited file before importing into postgres. That failed due to the automatic conversion of tabs to spaces by more...

这篇关于删除文本文件的第一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆