Launching a perl script in Powershell

Welcome Forums General PowerShell Q&A Launching a perl script in Powershell

This topic contains 2 replies, has 3 voices, and was last updated by

1 year, 1 month ago.

  • Author
  • #90685

    Points: 0
    Rank: Member


    I'm exploring the possibilities of Powershell and I'm wondering if it's possible to launch a perl script in Powershell.

    First, I need to move a couple of files from directory A to B.
    Secondly I need to launch a Perl script. This script will perform some data processing on the files in directory B

    The first part is not an issue. But I'm having issues with the second part.

    The perl script is in folder C:\Customer\DirectoryB => name:

    I'm trying with the script:

    start-process perl

    But this isn't working. I'm getting the error message "This command cannot be run due to the error: the system cannot find the file"

    I already tried adding the directory C:\Customer\DirectoryB, but this isn't working.

    Who can help me?

    Thanks in advance for the help.

    Best regards,

  • #90800

    Points: 67
    Rank: Member

    Does it throw the same error if you put in the full path to perl.exe?

    • #90812

      Points: 749
      Helping Hand
      Rank: Major Contributor

      You could try to change the current directory before launching perl like this:

      Push-Location -Path 'C:\Customer\DirectoryB'
      Start-Process -FilePath 'Full path to perl.exe' -ArgumentList 'C:\Customer\DirectoryB\'

The topic ‘Launching a perl script in Powershell’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort