So you really were asking how to open the item and not how to run the item in Explorer. Two completely different things.
Here is a demo of how to correctly manage items in a DGV.
Get-ChildItem list txt file and more!
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: Get-ChildItem list txt file and more!
- Attachments
-
- Demo-DGVClick2.psf
- (19.41 KiB) Downloaded 133 times
- apowershelluser
- Posts: 190
- Last visit: Mon Mar 18, 2024 7:13 pm
Re: Get-ChildItem list txt file and more!
Hmm, not sure where I said 'run'. I do remember this is what I said viewtopic.php?f=18&t=12095#p65297
Anyway, Wow! So little code and so much happening.
I have to incorporate this into a Job and replace the textbox with a drop down of my servers, add some combo-boxes and I'll have something wrapped up.
Something like this ( I clearly need to incorporate more of your code but this is what I'd like my GUI to look like):
My idea being they select the server from the combobox, click the Query button adds to a variable ($files from your script), which will display every folder in the directory in the DGV
Use the radoiobuttons to query again what I need based off the files names of:
Capture Completed with Errors = Failed
Capture Completed with Success = Captures
Capture Syncing = Pending
Viola, the DGV is populated as needed for high level with a mouse double click to open the folder ( invoke-item) - remember my original post, this is exactly what I wanted
2nd Phase - second column using a select string to see why it failed in a \Logs folder
Thanks for all of your help so far!
Anyway, Wow! So little code and so much happening.
I have to incorporate this into a Job and replace the textbox with a drop down of my servers, add some combo-boxes and I'll have something wrapped up.
Something like this ( I clearly need to incorporate more of your code but this is what I'd like my GUI to look like):
My idea being they select the server from the combobox, click the Query button adds to a variable ($files from your script), which will display every folder in the directory in the DGV
Use the radoiobuttons to query again what I need based off the files names of:
Capture Completed with Errors = Failed
Capture Completed with Success = Captures
Capture Syncing = Pending
Viola, the DGV is populated as needed for high level with a mouse double click to open the folder ( invoke-item) - remember my original post, this is exactly what I wanted
2nd Phase - second column using a select string to see why it failed in a \Logs folder
Thanks for all of your help so far!
- Attachments
-
- DGV5.psf
- (77.94 KiB) Downloaded 111 times
- apowershelluser
- Posts: 190
- Last visit: Mon Mar 18, 2024 7:13 pm
Re: Get-ChildItem list txt file and more!
Is this the correct way to use multiple jobs in PowerShell Studio?
it's running correctly, I just wanted to make sure I'm not missing something.
JobName does the get-childitem to list all of the files
JobNameTotalCount - gets the total amount of folders on the server
JobNameTotalFailures - gets the total count of failures based on this script
Get-ChildItem \\server\users\*\ |
ForEach-Object{
Get-ChildItem $_ -File |
Where-Object {($_.fullname -match "Cycle Completed with Errors")} | select FullName
}
it's running correctly, I just wanted to make sure I'm not missing something.
JobName does the get-childitem to list all of the files
JobNameTotalCount - gets the total amount of folders on the server
JobNameTotalFailures - gets the total count of failures based on this script
Get-ChildItem \\server\users\*\ |
ForEach-Object{
Get-ChildItem $_ -File |
Where-Object {($_.fullname -match "Cycle Completed with Errors")} | select FullName
}
- Attachments
-
- MultipleJobs.png (18.81 KiB) Viewed 2453 times
- apowershelluser
- Posts: 190
- Last visit: Mon Mar 18, 2024 7:13 pm
Re: Get-ChildItem list txt file and more!
I just want to make sure there wasn't a different way to add jobs. This is a new realm for me in terms of Jobs