Run a CMD command in Excel

January 9, 2018 at 02:49:05
Specs: Windows 7
Hi everyone,
1) I would like to have two "Browse" button in Excel to select two Folders.
2) Then another button that runs a CMD command like: Folder1> dir>"Folder2\dirlist.txt"
3) Import the txt in Excel
Is it difficult? Unfortunately I've no idea on how doing it.

Thanks a lot for your help.

See More: Run a CMD command in Excel

Report •

January 9, 2018 at 11:36:09
My VBA skills are just above nil, so I can't help in that matter,
but on the Ribbon, under the Data Tab,
there is a Get External Data option
with a From Text option.
Have you investigated using that option?

Also, there is a possibility that you could HYPERLINK to the file,
copy the contents, close the HYPERLINK and paste the data.

Also, on the Ribbon, under Insert Tab
there is an option to Insert Object, which can be a text file,
The file will appear as an Icon in your sheet, then when you click
on the icon the file opens.
Why do you want to copy the data from Folder1 to a text file in Folder2?
Why not just get the data directly from Folder2?

Or is it you want a directory listing of the files in Folder1?

What exactly is it you are trying to do?


Report •

January 9, 2018 at 12:59:18
My knowledge of Excel is basic to say the least... Indeed I learn a lot following responses here by the few Ecel gurus...

Meanwhile I dun a wee google trawl and I got some interesting hits usng the term/string

cmd in excel

Perhaps repeat my google trawl usng the above? I think there are possible workable routnes...?e

Report •
Related Solutions

Ask Question