I'm rather new to powershell and I couldn't find any documentation as to how to deal with the following issue. I just don't know how to word my question succinctly enough to produce any extremely relevant results on google.
Let's say I have a list of files in a directory:
$stuff = "file name1 1.csv", "file name2 78.csv", "file name3 14.csv"
"file name1 1.csv"
"file name2 78.csv"
"file name3 14.csv"
I would like to remove the first space after the word file and the second space after the word name, while also disregarding the .csv designation, leaving me with:
"filename1"
"filename2"
"filename3"
I just want a list of these file names to loop over. I'd like to code this so I can generalize it to any group of filenames. Does anybody have any good ideas or can anyone point me in the right direction/documentation?
Thanks in advance.