Page 1 of 1 1
Topic Options
#186806 - 2008-04-09 05:21 PM Merging two text files
duo Offline
Getting the hang of it

Registered: 2007-10-25
Posts: 61
Loc: iowa
Alright guys heres the run down, I have a small kixtart app that is run from batch script, the batch script runs two apps, cpuz, and keyfinder.

Kixtart then has the user enter the key on the machine(the installed key is a corporate VLK so this does no good).

Then the generated files are send through outlook via kixtart


The problem!

I have two generated files 1.txt and 2.txt.
With kixtart i need to merge these files into the workstation name
(yes there is a reason, no i dont want to hear alternatives)


shell "copy /Y 2.txt+1.txt @WKSTA.txt" Does nothing
shell "copy /Y 2.txt+1.txt %computername%.txt" Does nothing.

copy /Y 2.txt+1.txt %computername%.txt in the directory, via cmd works fine

Top
#186808 - 2008-04-09 06:07 PM Re: Merging two text files [Re: duo]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
 Code:
$ = RedirectOutput(@WKSTA + '.txt')   ; redirect output to desired file
Display 2.txt                         ; output first file (2??)
; You may need to insert a @CRLF here... depends on format of first file
Display 1.txt                         ; output next file
$ = RedirectOutput('')                ; close output redirection

should do the trick, so long as the original files are less than 64K, or you are using Kix 6.0

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#186810 - 2008-04-09 06:13 PM Re: Merging two text files [Re: Glenn Barnas]
duo Offline
Getting the hang of it

Registered: 2007-10-25
Posts: 61
Loc: iowa


Edited by duo (2008-04-09 06:26 PM)
Edit Reason: im a moron

Top
#186812 - 2008-04-09 07:26 PM Re: Merging two text files [Re: duo]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Did not test it, but something like
shell '%comspec% /c copy 1.txt + 2.txt ' + @WKSTA + '.txt'
would maybe also do the trick?

Top
#186814 - 2008-04-09 07:56 PM Re: Merging two text files [Re: duo]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
 Originally Posted By: duo
Edit Reason: im a moron

So, you're some kind of AMD processor, successor to the Athalon and the Duron? ;\)
See this site for more info...

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#186836 - 2008-04-10 03:34 PM Re: Merging two text files [Re: Glenn Barnas]
duo Offline
Getting the hang of it

Registered: 2007-10-25
Posts: 61
Loc: iowa
Id like to think of myself as a Quad core celeron at 400mhz...
Top
#186857 - 2008-04-11 01:39 AM Re: Merging two text files [Re: duo]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
LOL! I'm not sure if that processor type would be considered "conflicted" or "confused"! I guess it would depend on whether or not you had Xeon-ic tendencies or not. ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org