textfiles

Simple MOLAP solution

To analyze lots of text logs I did some hackery that looks like this Locally import logs into Access Reprocess Cube link to previous mdb in Analisis Service 2000 (yes it is 2k) Use Excel to visualize Cube (it is not big - up to milions raw entries) My hackery is a succes and more people are demanding an access to my Tool. As you see I ...

How to monitor a text file in realtime

Hi, for debugging purpose in a somewhat closed system, I have to output text in a file. Does anyone knows of a tool that runs on windows ( console based or not ) that detects changes to a file and outputs them in real-time ? ...

Using Hibernate to work with Text Files

Hey all, I am using Hibernate in a Java application to access my Database and it works pretty well with MS-SQL and MySQL. But some of the data I have to show on some forms has to come from Text files, and by Text files I mean Human-Readable files, they can be CSV, Tab-Delimited, or even a key, value pair, per line since my data is as si...

Reading text files using .NET

I need to read from a variety of different text files (I've some delimited files and some fixed width files). I've considered parsing the files line by line (slow using the File.ReadLine type methods) and reading the file using the ODBC text driver (faster) but does anyone have any other (better) suggestions? I'm using .NET/C#. ...

How to detect file ends in newline?

Over at Can you modify text files when committing to subversion? Grant suggested that I block commits instead. However I don't know how to check a file ends with a newline. How can you detect that the file ends with a newline? ...

How do I increment a value in a textfile using the regular Windows command-line?

I'd like to keep a "compile-counter" for one of my projects. I figured a quick and dirty way to do this would be to keep a textfile with a plain number in it, and then simply call upon a small script to increment this each time I compile. How would I go about doing this using the the regular Windows command-line? I don't really feel li...

What's the best way to read the contents of a text file to a string in .NET?

It seems like there should be something shorter than this: private string LoadFromFile(string path) { try { string fileContents; using(StreamReader rdr = File.OpenText(path)) { fileContents = rdr.ReadToEnd(); } return fileContents; } catch { throw; } } ...

How can you find and replace text in a file using the Windows command-line environment?

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions? ...

Best Free Text Editor Supporting *More Than* 4G Files?

I am looking for a text editor that will be able to load a 4+ Gigabyte file into it. Textpad doesn't work. I own a copy of it and have been to its support site, it just doesn't do it. Maybe I need new hardware, but that's a different question. The editor needs to be free OR, if its going to cost me, then no more than $30. For Windo...

What's the best way to generate a Text file in a .net website?

I have a page in my vb.net web application that needs to toss a bunch of data into a text file and then present it to the user for download. What's the best / most efficient way to build such a text file on a .net web server? Edit: to answer a question down below, this is going to be a download once and then throw-away kind of file. U...

In .net, what's the best / safest way to add a "end of line" character to a text file?

I assume there must be a system and language independent way to just stick the "current" EOL character into a text file, but my MSDN-fu seems to be weak today. Bonus points if there is a way to do this in a web application that will put the correct EOL character for the current client's machine's OS, not the web server's. ...

How do I correct the character encoding of a file?

I have an ANSI encoded text file that should not have been encoded as ANSI as there were accented characters that ANSI does not support. I would rather work with UTF-8. Can the data be decoded correctly or is it lost in transcoding? What tools could I use? Here is a sample of what I have: ç é I can tell from context (café should...

Unit Tests for comparing text files in NUnit

I have a class that processes a 2 xml files and produces a text file. I would like to write a bunch of unit / integration tests that can individually pass or fail for this class that do the following: For input A and B, generate the output. Compare the contents of the generated file to the contents expected output When the actual co...

Best language for a non-programmer tech support person to learn

I have a colleague that handles tech support, and her role involves a lot of transforming ASCII files from one format to another and occasionally reporting on them. The formats tend to be largely plain text with an occasional bit of XML. She regularly gets me to write small scripts to do these transformatsions, and also batch files for...

I'm looking for a pythonic way to insert a space before capital letters.

I've got a file whose format I'm altering via a python script. I have several camel cased strings in this file where I just want to insert a single space before the capital letter - so "WordWordWord" becomes "Word Word Word". My limited regex experience just stalled out on me - can someone think of a decent regex to do this, or (better...

Remove last record from the text file!

What's the easiest way to remove last row from the text file using SQL Server Integration Services? Thanks. ...

Using a SQL Server for application logging. Pros/Cons?

I have a multi-user application that keeps a centralized logfile for activity. Right now, that logging is going into text files to the tune of about 10MB-50MB / day. The text files are rotated daily by the logger, and we keep the past 4 or 5 days worth. Older than that is of no interest to us. They're read rarely: either when develop...

determining the line terminator in emacs

I'm writing a config file and I need to define if the process expects a windows format file or a unix format file. I've got a copy of the expected file - is there a way I can check if it uses \n or \r\n without exiting emacs? ...

How to change the format of substitution variables in a template

Hi, I need to to iterate over the files in a directory and perform the following replacement. Before: Hello ${USER_NAME}, you live at ${HOME_ADDRESS}. It is now ${TIME} After: Hello ${userName}, you live at ${homeAddress}. It is now ${time} The number of different tokens that appear within ${} is large, so it's not real...

Reading text values into matlab variables from ASCII files

Consider the following file var1 var2 variable3 1 2 3 11 22 33 I would like to load the numbers into a matrix, and the column titles into a variable that would be equivalent to: variable_names = char('var1', 'var2', 'variable3'); I don't mind to split the names and the numbers in two files, however preparing matlab code...