Computing.Net > Forums > Windows 2000 > Just Text Files but..... -->SQL DTS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Just Text Files but..... -->SQL DTS

Reply to Message Icon

Name: Gmiadlicher
Date: February 12, 2003 at 03:25:46 Pacific
OS: Win2k
CPU/Ram: doesnt matter
Comment:

Hi people!

I have a little Problem!
The job is to build a database via DTS where the source is one textfile.

Its now like this that this textfile has to be build of several textfiles.

it would be no Problem i thought just to start a dos shell then do this:
"type *.txt > all.txt" then one file is created includig the contents of all the textfiles, but heres the s---ty part:
The textfiles a delimited with an LF, but at the end of every textfile ther is no delimiter!

So the question is how can i insert a string at the end of serveral text files ??? Is there a tool or something?
Ive searched the ned but found nothing!

PLEEEEASE anybody : HELP! I need this in my work!

thanx very much in advance



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: February 12, 2003 at 07:09:37 Pacific
Reply:

If I understood, this script should work for you:

@Echo Off

:: JTEXT.BAt Syntax: JTEXT Source Dest String
:: Ex: JTEXT C:\MyDir\*.txt C:\OutDir\All.txt ****

If "%1"=="[EXEC]" GoTo EXEC

For %%A in (%1) Do Call Jtext [EXEC] %%A %2 %3
GoTo EXIT

:EXEC
Shift
Type %1>> %2
Echo %3>> %2

:EXIT

That joins all files into one and appends the character string you want at the end of each source text file.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: Just Text Files but..... -->SQL DTS

text file editting in a batch file www.computing.net/answers/windows-2000/text-file-editting-in-a-batch-file/31251.html

Importing text files into Excel 97 www.computing.net/answers/windows-2000/importing-text-files-into-excel-97/37209.html

Batch script for parsing text file www.computing.net/answers/windows-2000/batch-script-for-parsing-text-file/63351.html