Windows 10: Powershell programming: strange behaviour with Test-Path & Resolve-Path?

Discus and support Powershell programming: strange behaviour with Test-Path & Resolve-Path? in Windows 10 BSOD Crashes and Debugging to solve the problem; I have a PS script which seems to fart when testing for the existence of a certain filename. It’s the only filename it seems to have this problem on,... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by BlackJacques, Oct 20, 2023.

  1. Powershell programming: strange behaviour with Test-Path & Resolve-Path?


    I have a PS script which seems to fart when testing for the existence of a certain filename. It’s the only filename it seems to have this problem on, but with all other filenames, it works as expected.Given a full pathname of the file, let’s say:Test-Path ‘\dir1\dir2\dir3\filename1.ext’Run this through either the Test-path or Resolve-Path

    :)
     
    BlackJacques, Oct 20, 2023
    #1
  2. dalchina Win User
    dalchina, Oct 20, 2023
    #2
  3. Add a path to $PATH?

    Yeah, I think you're right. I think the purpose of the echo command was to check if ~/bin was in the $PATH file. My problem is that I can't decipher the output and I don't know how to add ~/bin to the $PATH file.

    Just for clarification, the snippet of instructions I gave is just a few steps in the installation process. Nothing is actually supposed to be installed with those steps.

    Thanks for the reply.
     
    angelkiller, Oct 20, 2023
    #3
  4. Powershell programming: strange behaviour with Test-Path & Resolve-Path?

    Add a path to $PATH?

    what exactly do you need to decipher about that path line? also, what are you installing? perhaps i can help.
     
    Easy Rhino, Oct 20, 2023
    #4
Thema:

Powershell programming: strange behaviour with Test-Path & Resolve-Path?

Loading...
  1. Powershell programming: strange behaviour with Test-Path & Resolve-Path? - Similar Threads - Powershell programming strange

  2. strange path in Sysmon logs

    in Windows 10 Software and Apps
    strange path in Sysmon logs: HelloIn Windows 10 Enterprise 22 H2, a strange path in TargetFilename sometimes appears in Sysmon logs:TargetFilename: C:\Users\P310C~1.ZNO\AppData\Local\Temp\7b542cd6-d613-4e52-bfdf-b80fe911ff30.tmpAnd in the next event, the path is normal:TargetFilename:...
  3. strange path in Sysmon logs

    in Windows 10 Network and Sharing
    strange path in Sysmon logs: HelloIn Windows 10 Enterprise 22 H2, a strange path in TargetFilename sometimes appears in Sysmon logs:TargetFilename: C:\Users\P310C~1.ZNO\AppData\Local\Temp\7b542cd6-d613-4e52-bfdf-b80fe911ff30.tmpAnd in the next event, the path is normal:TargetFilename:...
  4. strange path in Sysmon logs

    in Windows 10 Gaming
    strange path in Sysmon logs: HelloIn Windows 10 Enterprise 22 H2, a strange path in TargetFilename sometimes appears in Sysmon logs:TargetFilename: C:\Users\P310C~1.ZNO\AppData\Local\Temp\7b542cd6-d613-4e52-bfdf-b80fe911ff30.tmpAnd in the next event, the path is normal:TargetFilename:...
  5. Powershell programming: strange behaviour with Test-Path & Resolve-Path?

    in Windows 10 Gaming
    Powershell programming: strange behaviour with Test-Path & Resolve-Path?: I have a PS script which seems to fart when testing for the existence of a certain filename. It’s the only filename it seems to have this problem on, but with all other filenames, it works as expected.Given a full pathname of the file, let’s say:Test-Path...
  6. Powershell programming: strange behaviour with Test-Path & Resolve-Path?

    in Windows 10 Software and Apps
    Powershell programming: strange behaviour with Test-Path & Resolve-Path?: I have a PS script which seems to fart when testing for the existence of a certain filename. It’s the only filename it seems to have this problem on, but with all other filenames, it works as expected.Given a full pathname of the file, let’s say:Test-Path...
  7. Something called 'program' in startup of task manager with strange path file

    in AntiVirus, Firewalls and System Security
    Something called 'program' in startup of task manager with strange path file: [ATTACH] I can't find Power sound editor free folder anywhere and yes I changed the show hidden files and folders. https://answers.microsoft.com/en-us/windows/forum/all/something-called-program-in-startup-of-task/a25a9d78-6d66-4c20-a0c0-b3b28784e20b
  8. My path looks strange

    in Windows 10 Network and Sharing
    My path looks strange: Hi, I was wondering if my path looks correct. When I start up my laptop (Lenovo Yoga Windows 10 most recent update) I see the following path: C:\Users\User\OneDrive\Desktop\ Why do I see Users\User Does this mean I am constantly saving on OneDrive. That would be a...
  9. Is there a universal variable for the path to a program

    in Windows 10 Support
    Is there a universal variable for the path to a program: I have noticed on several occasions that during the installation of a program downloaded from the internet that there was some sort of variable in the path to the installation folder I would just accept the default and the installation went OK. I assumed that the variable...
  10. Path to 'Documents' folder -- strange behavior

    in Windows 10 Support
    Path to 'Documents' folder -- strange behavior: About three weeks ago I migrated from XP to Windows 10, putting all my personal folders that were in XP's 'My Documents' into Win10's 'Documents' folder. The eBooks for my legacy eBook reader (MobiPocket) were in the XP folder 'My eBooks', which is now a sub-folder of Win10's...