![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
|
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Command substitution Ah... I did misunderstand your statement. What you want should be even easier myscript.py (ls * | %{$_.fullname}) Brandon Shell [MVP] ------------------------ Blog: http://www.bsonposh.com/ Author: http://www.TurboChargeAD.org Profile: https://mvp.support.microsoft.com/profile/Brandon K> Thank for the link, which is interesting reading, however I don't K> think it solves my problem. I get an error when I try to follow your K> example: K>
K> File "myscript.py", line 74, in <module> K> lines = open(fname, "r").readlines() K> IOError: [Errno 2] No such file or directory: '\\\\ls *' K> So, you see that the literal string "ls *" is passed as an argument, K> not the expanded list of files. Yes, the script is in python, so I K> will probably jsut modify it to accept globs. I was hoping, however, K> that Windows will allow me to somehow substitute the command and do a K> fancy one-liner. K> K> Cheers, K> Karol K> On Jan 8, 3:33 pm, Brandon Shell [MVP] <a_bshell.m...@xxxxxx> K> wrote: K>
| ||||||||||||||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
|
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Make a command prompt run a command as soon as it opens? | Fmjc001 | General Discussion | 11 | 11-17-2008 12:37 PM |
| How to perform variable substitution in powershell? | Arun Kumar | PowerShell | 0 | 10-30-2008 07:56 AM |
| Command Line Ren (Rename) command broken? | SixSigmaGuy | Vista General | 5 | 05-20-2008 05:52 AM |
| Command & variable substitution | Chris | PowerShell | 5 | 01-09-2008 07:45 AM |
| Stumped by variable substitution | K Kong | PowerShell | 8 | 05-16-2007 03:03 AM |