Setting File and Folder Paths

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
Posts: 5
Joined: Fri Feb 15, 2019 1:55 pm

Setting File and Folder Paths

Post by TSMike » Thu Feb 06, 2020 2:38 pm

I was researching and looking up how to do a progress bar and I came upon your walk-through: ... ogress-bar

In the ProgressBarSimpleTask02.spf file (attached), I started looking at the script part of the code and came across some code I have seen before, but don't understand it. When creating file or folder paths, the path is prefixed with "{0}\\" (line 35 of the script) or when running the Copy-Item you use "'{0}\\{1}'" (line 74).

Will you please explain what those represent or do? I've tried to search this answer on my own but haven't had any luck.

Thank you!
(37.4 KiB) Downloaded 3 times

Posts: 14145
Joined: Tue May 22, 2007 9:57 am

Re: Setting File and Folder Paths

Post by jvierra » Thu Feb 06, 2020 3:44 pm

See the following for a full explanation:

Post Reply