Hi Friends i have a .csv file in which there are some unwanted text which i want to remove for extracting the files name only. If anybody is having any idea to solve this please help.
>(Get-Content "D:\Convert\txtdoc\rtbTextBox.csv") | >Foreach-object {$_ -replace ".*>" -replace "<\.*"} | >Set-Content "D:\Convert\txtdoc\rtbTextBox.csv" File is having Text as below: TEST-2014-08026 30-05-2014 Developer svn://10.285.120.144/devmd/Trunk load\hcl\safetoload\doc_typ\TEST-2014-08026_doc_typ.csv hcl\safetoload\doc_typ\doc_typ.ctl load\hcl\safetoload\doc_typ_arg\TEST-2014-08026_doc_typ_arg.csv hcl\safetoload\doc_typ_arg\doc_typ_arg.ctl load\hcl\safetoload\doc_lblfmt\TEST-2014-08026_doc_lblfmt.csv hcl\safetoload\doc_lblfmt\doc_lblfmt.ctl load\hcl\safetoload\dscmst\TEST-2014-08026_dscmst.csv hcl\safetoload\dscmst\dscmst.ctl load\hcl\safetoload\lblfmt\TEST-2014-08026_lblfmt.csv hcl\safetoload\lblfmt\lblfmt.ctl labels LABEL\1662_ceva_carlbl.POF LABEL\1662_ceva_carlbl.lbl 1662_ceva_carlbl.msql I want to save result as For EX :** TEST-2014-08026_doc_typ.csv
doc_typ.ctl
TEST-2014-08026_doc_typ_arg.csv
doc_typ_arg.ctl
TEST-2014-08026_doc_lblfmt.csv
VulpesPosted Jul 30, 2014, 1:41 PM
The csv file now looks like this:
Naveen SinghPosted Jul 30, 2014, 1:14 PM
VulpesPosted Jul 30, 2014, 12:32 PM
Naveen SinghPosted Jul 30, 2014, 12:15 PM
VulpesPosted Jul 30, 2014, 11:57 AM
Naveen SinghPosted Jul 30, 2014, 11:48 AM
VulpesPosted Jul 30, 2014, 11:26 AM
The output is:
I'm not clear from your post whether you just want to extract these details or to save the 'cleaned' data back to the file?