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
TSMike
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:
https://info.sapien.com/index.php/guis/ ... 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!
Attachments
ProgressBarSimpleTask02.psf
(37.4 KiB) Downloaded 4 times

jvierra
Posts: 14155
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Setting File and Folder Paths

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

See the following for a full explanation: https://ss64.com/ps/syntax-f-operator.html

Post Reply