How to redirect a file of input data in PowerShell?

Page 1 of 2 12 LastLast

  1. Posts : 3
    Windows Home 10 Upgrade
       #1

    How to redirect a file of input data in PowerShell?


    In the past, before Windows 10 update, we had Command Prompt, but now we have PowerShell instead. I would like to know how to use a redirected file of input data into an EXE program. I used to write 'C:\Users\Owner\desktop>program.exe < input.dat' but the system says that '<' is not valid and reserved for future use. How do I get around this?
      My Computer


  2. Posts : 42,998
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2
      My Computers


  3. Posts : 3
    Windows Home 10 Upgrade
    Thread Starter
       #3

    Thanks, dalchina, cmd.exe is the workaround I wanted. --Paul
      My Computer


  4. Posts : 42,998
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    Great!
      My Computers


  5. Posts : 1,097
    Windows 10 Home x64 Version 1809 (OS Build 17763.437)
       #5

    Also, Command Prompt is still here.

    Start Menu>Windows System>Command Prompt>Right Click>More>Run As Administrator

    How to redirect a file of input data in PowerShell?-cmd.png
      My Computer


  6. Posts : 3
    Windows Home 10 Upgrade
    Thread Starter
       #6

    Thanks, Clayton, even better! --Paul
      My Computer


  7. Posts : 1,097
    Windows 10 Home x64 Version 1809 (OS Build 17763.437)
       #7

    You are most welcome Sir. You have a good day...
      My Computer


  8. Posts : 9,790
    Mac OS Catalina
       #8

    Easier way to pull up command is just Windows key with the X key.
      My Computer

  9.   My Computers


  10. Posts : 1,097
    Windows 10 Home x64 Version 1809 (OS Build 17763.437)
       #10

    bro67 said:
    Easier way to pull up command is just Windows key with the X key.
    Not on this machine since CU

    How to redirect a file of input data in PowerShell?-capture.png
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:41.
Find Us




Windows 10 Forums