https://www.sapien.com/blog/2011/07/14/ ... r-control/
So I understand this completely, all but one aspect. I'm creating application that backs up a selected folder to whatever folder I choose.
The problem is this line
$destination = ('{0}\\Backup' -f $selectedPath)
What I'd like it to be is the name of the selected source folder so for example I'm backing up someones users profile
I want it to create a folder with the users profile so Adam for example
Hopefully that makes sense.
Progress Bar blog post
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.
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.
Re: Progress Bar blog post
Instead of the script creating a folder named backup, I want it to create the selectedfolder
So I want it to be
C:\Users\steve\Desktop\!TestROBOCOPY\10 Extract
not
C:\Users\steve\Desktop\!TestROBOCOPY\Backup
So I want it to be
C:\Users\steve\Desktop\!TestROBOCOPY\10 Extract
not
C:\Users\steve\Desktop\!TestROBOCOPY\Backup
- Attachments
-
- 11-27-2015 9-53-44 PM.png (9.23 KiB) Viewed 4157 times
Re: Progress Bar blog post
The blog post is using a progress bar. You are asking about how to change a folder. The input boxes are there to allow you to type in a different value than the default. If you want a different default then just change the default in the code.
Re: Progress Bar blog post
Just change the txt in the template.localpct wrote:Instead of the script creating a folder named backup, I want it to create the selectedfolder
So I want it to be
C:\Users\steve\Desktop\!TestROBOCOPY\10 Extract
not
C:\Users\steve\Desktop\!TestROBOCOPY\Backup
$destination = ('{0}\\10 Extract' -f $selectedPath)
Re: Progress Bar blog post
But that will make it static and I'd like to make it dynamic.
And the text box and button are the Textbox - Browse for folder from Control Sets
And the text box and button are the Textbox - Browse for folder from Control Sets
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am
Re: Progress Bar blog post
dynamic from where? Create a selected folder?
$folderbrowserdialog1.ShowDialog()
Write-Host $folderbrowserdialog1.SelectedPath
$folderbrowserdialog1.ShowDialog()
Write-Host $folderbrowserdialog1.SelectedPath