Post #373,274
4/2/13 4:26:12 PM
|

up an odious creek sans paddle
tools available cmd prompt windows 7
570 small text files
one spread sheet that has a cell that needs to be populated by the contents of the small text files individually
now for %f in (*.txt) do type "%f" >> new.txt makes one large text file but out of order for the spreadsheet with no way to sort them out as the key is in the name of the file, not the contents
I have one day to figure it out or it is cut and paste for the next week
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,276
4/2/13 4:32:45 PM
|

Sounds like an ideal application for Python.
Grab Python 2.7.3 from here - http://www.python.org/download/
Grab the add-ons for ease of working with Excel sheets (including writing to them), here - http://www.python-excel.org/
You should be good to go very quickly.
OTOH, will "sort" help you? http://www.computerhope.com/sorthlp.htm
HTH.
Cheers,
Scott.
(Who is assuming you can install things like that on the machine in question, but realizes this is a bad assumption.)
|
Post #373,277
4/2/13 4:48:27 PM
|

cannot use external software
I could wait a week until I get a linux vm but dont want to wait. It must be done with native windows 7 tools
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,278
4/2/13 5:16:22 PM
|

Will "sort" help? It's there in Winders. "sort /?"
|
Post #373,280
4/2/13 5:22:36 PM
|

its there but I need to remember how to do loops in
BAT files. If the date was circa 1994 I would just copy con a batch file. My brain however has long since purged such stuff to 3rd tier storage (way deep in the colon somewhere) will plink with it tho
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,281
4/2/13 5:26:14 PM
|

Here...
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
|
Post #373,279
4/2/13 5:19:13 PM
|

Now you know...
why I won't use Windows. It is not a complete Operating System.
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
|
Post #373,286
4/2/13 7:48:23 PM
|

The sort of thing I'd use Emacs for
Pull up a dired with the files and write a keyboard macro to build a CSV from the list.
Regards, -scott Welcome to Rivendell, Mr. Anderson.
|
Post #373,289
4/2/13 8:56:36 PM
|

no emacs
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,294
4/2/13 9:30:56 PM
|

Its downloadable
and install-able easily. Why force yourself to use a partially existing OS. They'd probably buy you a $400 package to automate it...
EMACS is free even for Windows 95/98/ME/NT/XP/Vista/7 and maybe works in 8 also.
all of 46 MB. And your task would be orders of magnitudes easier.
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
|
Post #373,296
4/2/13 10:01:27 PM
|

He can't download anything...
Regards, -scott Welcome to Rivendell, Mr. Anderson.
|
Post #373,308
4/3/13 9:25:11 AM
|

download it at home
bring to the office on a USB stick?
Satan (impatiently) to Newcomer: The trouble with you Chicago people is, that you think you are the best people down here; whereas you are merely the most numerous.
- - - Mark Twain ÂPuddÂnhead WilsonÂs New Calendar, 1897
|
Post #373,310
4/3/13 9:57:55 AM
|

Not worth the risk.
There must be ways to do what he needs with the tools available. There's no sense in him making waves and rebelling against the company policy given the circumstances - especially when he's so new there.
E.g. http://technet.micro...ary/bb491004.aspx
My $0.02.
Cheers,
Scott.
|
Post #373,311
4/3/13 9:59:14 AM
|

NSA DOD rules in place
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,302
4/3/13 7:45:55 AM
|

How does the filename convert to the cell reference?
|
Post #373,312
4/3/13 10:01:24 AM
|

file name references a spec
I think it may be easier to rewrite the redhat script and include it in the output there.
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,303
4/3/13 7:47:40 AM
|

Small files fitting in a spreadsheet?
Do you HAVE to do it or can you toss it off?
Give me a spec and send them to me.
|
Post #373,326
4/3/13 1:30:01 PM
|

better, added statement to bash script to include
an echo of the variable I need in the file. So I get my new 500+ files
for %f in (*.txt) do type "%f" >> new.txt
cats all 500+ files into one file
use notebook++ search and replace to remove all of the line feeds to have just one long line use search and replace to add a linefeed just in front of the unique variable name and voila, a single column that I needed for excel. Now off to learn excel merging
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,340
4/3/13 3:00:07 PM
|

Excel VBA
Could have used VBA to pull in the file contents.
|
Post #373,343
4/3/13 3:30:30 PM
|

Re: Excel VBA, couldn't remember any :-)
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
|
Post #373,387
4/4/13 1:57:21 AM
|

F1, or record the macro, or use a fancy pants
text import.
I use an unholy combination of C#, Python, Excel and sed to munge data around (don't ask, it's one of those things where the progenitor of the thing that makes the report files did that thing where the output looks pretty on screen but is actually about as machine-readable as a punch in the face) these days.
|