locked
Why powershell cannot locate following path? RRS feed

  • Question

  • I would like to know on why powershell cannot locate following path, which is existed
    remove-item C:\Users\John\AppData\Local\ABC\Tese\*.*

    Does anyone have any suggestions?
    Thanks in advance for any suggestions


    Thanks in advance for any suggestions


    Tuesday, July 9, 2019 8:20 AM

Answers

All replies

  • Most likely the path does not exist.  Try a path that does exist.


    \_(ツ)_/

    Tuesday, July 9, 2019 8:28 AM
  • Hi,

    Make sure that you haven't misspelled the path or name of the user, sounds to me like the user should be "John" and not "Jphn".

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, July 9, 2019 8:31 AM
  • I find the problem, the folder name contains space between " ", which cause the error.

    remove-item C:\Users\John\AppData\Local\AB C\Tese\*.*

    Do you have any suggestions on how to handle this space with filename without renaming it?
    Thanks, to everyone very much for any suggestions (^v^)


    Thanks in advance for any suggestions


    Tuesday, July 9, 2019 4:10 PM
  • Use quotes around the path:

    Remove-Item "C:\Users\John\AppData\Local\AB C\Tese\*.*"


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by oemMicrosoft Tuesday, July 9, 2019 4:34 PM
    Tuesday, July 9, 2019 4:13 PM
  • Thanks, to everyone very much for suggestions (^v^)

    Thanks in advance for any suggestions

    Tuesday, July 9, 2019 4:34 PM