PDA

View Full Version : Looking for a program that will port data to excel



AnticorRifling
06-27-2005, 01:25 PM
What the subject says. Basically I need a program/utility that will port folder names from windows explorer to an excel spreadsheet. I don't care if it's stand alone, an excel addon whatever I need to pull folder names. Help a brotha and his brotha.

Suppa Hobbit Mage
06-27-2005, 01:52 PM
Explain what you mean by port? VBA for apps lets you map to a location, or do you mean the folder names are unknown and you need it to map to and then capture the names?

AnticorRifling
06-27-2005, 03:01 PM
Alright correction.

I need Wezas for this one. What I needed was the names of all the sub folders taken from say D:\Pinkerton and listed in something like excel. This would allow me to have a list of the folders so I could copy them and view them in a program I use here at work. This is where Wezas comes in. You know your pickpocketing program?

Well what I did was open command prompt and get into the directory, we'll use D:\Pinkerton, then I did a dir /ad >list.txt
which gives me a txt document listing all the folders in D:\Pinkerton. What I'd like to do is have something like your PP program go in and capture certain file names (all the files in question always start with the same three letters) so it would look for:

ABC-random numbers and letters.more random
ABC-random numbers and letters.more random

In a perfect scenario all I really want is everything in the folder name after the .

( The folders are computername.user I need the users listed that's why I want the characters after the period. I don't care about the computer name but if I have to grab it in order to port the data to excel than so be it I can work around that. )

This would save myself and the other lead tech alot of time. Let me know if you've got a solution.

AnticorRifling
06-27-2005, 04:38 PM
Don't let me down people!

AnticorRifling
06-27-2005, 04:39 PM
Also note that porting to access would also be just as groovy.

Mistomeer
06-27-2005, 06:16 PM
Maybe I'm confused but couldn't you just do a DIR ABC*. >list.txt then import that data into excel or access?

AnticorRifling
06-27-2005, 07:24 PM
What I want to do is do the dir listing in each main folder (probably 10 of them or so) then run something that will capture the data from each list.txt more specifically the part of the data that is the user name then put it in excel or access. I could do a manual copy and paste but I'm looking to avoid that as this will be something that has to be done daily(and is currently being done daily, manually, by myself and another tech.) I'm looking to work smarter not harder so hook me up.

Latrinsorm
06-27-2005, 09:07 PM
I know there's some way in VisualBasic.net to work with characters, so if you could have it read in the string character by character, with a while character != ., then keep the rest of the string, would that do the job? It'll take me til Wednesday to have time to do this, but I reckon somebody out there knows what I'm talking about. Also it'd have to check to make sure the string is in the ABC format.

edit: Also, this would leave you with a txt file, which would then have to be manually imported to excel.

[Edited on 6-28-2005 by Latrinsorm]

Eviltwinpsu
06-27-2005, 10:53 PM
couldn't u use the macro's in excel to run a vbprogram to do that???

its been a while since ive programed in vb so not to sure but i bet you could look at tsoran's file to get an idea of how to import using vb

Jonty
06-28-2005, 01:26 AM
couldn't u use the macro's in excel to run a vbprogram to do that???

You sure can.

AnticorRifling
06-28-2005, 11:43 PM
Show me Jonty.