Link to home
Start Free TrialLog in
Avatar of saladoil
saladoilFlag for United States of America

asked on

split file path and names into "fields" and create csv file with list

I am looking to do a directory listing of files and split up the path and file names into fields and create a csv file to import into a document mangement system - so from this dir list:
d:\ap\pcard\fax\mary_1234.tif
d:\ap\pcard\fax\joe_1342.tif
d:\ap\pcard\email\john_2468.pdf
d:\ap\pcard\scan\jill_2222.pdf
I would want this file:
date, source, name, acct#, file path
2/17/2011,fax,mary,1234,d:\ap\pcard\fax\mary_1234.tif
2/17/2011,fax,joe,1342,d:\ap\pcard\fax\joe_1342.tif
2/17/2011,email,john,2468,d:\ap\pcard\email\john_2468.pdf
etc
--
I have parts of this figured out but can't seem to put it all together.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saladoil

ASKER

great - just had to add |export-csv d:\ap\temp\out.csv to wrtie it to a file.
Thanks!