I have seen many examples of how to create a file through command line using a static name but I need to get it to show a dynamic name based off of my commands output. What I mean by this is the following:
I run the command npm -v and it returns 6.4.1 I can easily write that out to the inside of a file but I want the filename to be 6.4.1 if that is what the command returns. So if it returns 8.15.1 then the filename would be 8.15.1.
Any idea how to do that? I need this to be able to run on windows 7/10 machines so I can verify versions of npm and resolve version mismatches.