A
A
alex_msk2015-05-30 22:47:52
Software and Internet Services
alex_msk, 2015-05-30 22:47:52

Create text files from a list and content from a list?

Friends, tell me, a solution for windows, how to create files with names from one list, with contents from another list (the list is long)?
For example, there are 2 excel columns:
name 1 | content 1
name 2 | content 2
name 3 | content 3
....
It is necessary that a file (txt) be created with the name from the first column and the content from the second.
There is a similar solution here How to create multiple files with names from a list? , but empty files with names from the list are created there, but I would like to create a file with the desired content (from another list). Thank you for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2015-05-30
@alex_msk

export to CSV, for example to files.csv with column headers name and content
and..
PowerShell
foreach ($a in (Import-CSV -Delimiter ',' files.csv)) { Out-File -InputObject $a.content -FilePath $a.name}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question