Is there an easy way, preferably a scripting language or a small device that can be called through a batch file On the text file, mark an offset, and after the offset, can everything put in a new file?
I have a text file overnight, and I would like to do this so that the file is marked ending, then the new data is added, between the offset and the end only the data process is done. I can not do this just with the wire or the delimiter because it has Blob data.
Edit: Text file is created from running a MS Access macro with a scheduled task, which exports data as a CSV file. Considering Patrick's suggestion, I would like to know whether it would be possible to add a wildcard such as the date of the filename, is always a separate file, this file will then be scribbled on a Linux server, where it will be loaded in a mysql database .
Assuming that you are currently exporting data from a Access database with a script: < / P>
@echo OFF :: Force a new line and add a marker; Datatax is assuming your file. @echo & Gt; & Gt; Data.txt @echo ** Marker ** & gt; & Gt; Data.txt :: Run your export here: These rows emulate export @echo test line1 & gt; & Gt; Data.txt @echo Test Line 2 & gt; & Gt; Data.txt :: Find the line number for the last marker: / f "usebackq delims =:" %% i (`searchr / n '** marker **" data .tttt`) (set LAST_MARKER = %% I) :: Get all rows for the after / last marker "skip =% LAST_MARKER% tokens = *" %% l in (data.txt) (@echo %% l> new_data Txt)
new_data.txt
will output:
test line 1
test line 2
Comments
Post a Comment