I have file called 'main_file.txt' (c:temp\main_file.txt) that contains a single line of file path of another file like below.
Here in the below code, I need to access the above sub_file.csv (\\mynewfolder\folder\sub_file.csv)and use the contents to do some process. How to **change my below first line of code** to access the contents of the **sub_file.csv which is available as a path inside the main_file.txt**.
$txt = Get-Content "how to get the contents of sub_file.csv" | Out-String
...do some process with the contents of sub_file.csv..
Could you please help.