How to deal with long filenames in Windows Powershell
- 0 Comments
If you're new here, you may want to start with my most popular posts. Then, subscribe to my RSS feed to stay updated. Thanks for visiting!
Google Query: long filename and powershellÂ
I was working on a project the other day where I had to call a program from within Windows Powershell. This particular program needed command-line arguments and an input file when it was called. I wasn’t sure about the syntax of doing this in Powershell. After some Googling, I found the answer on the Microsoft Channel 9 Forums. The details are below.
-If you want to call a long filename in your Powershell script, the line looks similar to the one below (all on one line).
&'C:\Path\To\Your\Program.exe‘ -argument1 -argument2 ‘C:\Path\To\Your\Inputfile.txt‘
That’s it! Once I got the proper syntax, my Powershell script ran my external program beautifully. Happy Coding!
Technorati Tags: Windows, Powershell, Programming, Scripting
Related posts:


