Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Getting variables from a file

$
0
0
Hi, some time ago i made a pretty well working batch script to backup some data i had. But then i figured it would be cool if it was possible to add a "Backup Diagnostic" txt, that would be added to the folder destination of the files. But then i sort of crashed into the limits of what you can do in batch. Since there was no practical way to accurately measure the size of a folder. So i figured it would be fun to try and write it all again in powershell. And to make it more practical to add new folders to the backup sequence, i figured it would be better if i added all the paths to one separate text file. So my question is, how do i add my variables to a separate txt and make it add a new variable if there is a new line.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>