BTW: When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks for your response. I was given a task to write a function that could fetch an item on a PC. I used Fuad as an example in the code above because I have many items with Fuad on my PC. I have used the wildcard to find all the items that contains Fuad on my PC. The challenge I have now is that when I created my function, I created a parameter. That would take in the string that is been searched for. Whenever I pass in my parameter the code runs without any error or output
Your original code example would only find files or folders that have the exact name Fuad.
What function? What parameter? How did you call it?
Please keep in mind most, if not all of us, are unable to read your mind or remotely view your screen. Please help us help you by sharing the code you’re actually running (sensitive data replaced by dummy data if appropriate) so we may actually provide meaningful help.