Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help with correct code #85

Open
GitUser200607 opened this issue Aug 22, 2024 · 3 comments
Open

Need help with correct code #85

GitUser200607 opened this issue Aug 22, 2024 · 3 comments

Comments

@GitUser200607
Copy link

I have code in PowerShell:
$Path = "C:\Program Files\Unity\????.?.*f1\Editor\unity.exe
$filesList = Get-ChildItem -Path $Path -Force -Recurse

How can I find all files unity.exe using this path with wildcards?

This code found nothing:
string[] matchingFiles = Glob.Files(@"C:\", @"Program Files\Unity\????.?.*f1\Editor\unity.exe").ToArray();

@GitUser200607
Copy link
Author

This code returned nothing also:

var root = new DirectoryInfo(@"C:\");
var allFiles = root.GlobFiles("/Program Files/Unity/????.?.*f1/Editor/Unity.exe");

@kthompson
Copy link
Owner

@GitUser200607 can you give an example path that you would expect to be matched?

@GitUser200607
Copy link
Author

"C:\Program Files\Unity\2021.3.9f1\Editor\Unity.exe"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants