Windows 10: How to redirect a file of input data in PowerShell?

Discus and support How to redirect a file of input data in PowerShell? in Windows 10 Support to solve the problem; 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... Discussion in 'Windows 10 Support' started by Pacman01, Aug 5, 2017.

  1. Pacman01 Win User

    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?

    :)
     
    Pacman01, Aug 5, 2017
    #1

  2. How to redirect a directory in Windows 10

    Public Video's, Public Documents, etc. are the level of subfolders I was talking about, as they are all subfolders of Public.

    You can type your new path in the text box & redirect the folder, you'll just have to move the contents yourself.

    When moving files/folders, be sure File Explorer is set to show Hidden files -- including "superhidden", so that you copy the desktop.ini file.


    How to redirect a file of input data in PowerShell? [​IMG]


    Display Names:


    How to redirect a file of input data in PowerShell? [​IMG]


    Actual Names:


    How to redirect a file of input data in PowerShell? [​IMG]


    If you find after redirection that the Display names aren't shown, you may need to set the Read-only attribute on the folders, but that can come later.

    Keith
     
    Keith A. Miller, Aug 5, 2017
    #2
  3. JohnSijm Win User
    How to redirect a directory in Windows 10

    Hi Keith,

    Maybe I missed something but I can't.

    The only level that I have with the location tab is the Public Videos, Public Documents, etc level.

    All the subdirectories don't have a location tab.

    This is how my location tab looks like:


    How to redirect a file of input data in PowerShell? [​IMG]


    I can't change the line c:\Users\Public]Videos

    I hope this is not what you meant and that I have to do it different.

    Thanks,

    john
     
    JohnSijm, Aug 5, 2017
    #3
  4. dalchina New Member

    How to redirect a file of input data in PowerShell?

    dalchina, Aug 5, 2017
    #4
  5. Pacman01 Win User
    Thanks, dalchina, cmd.exe is the workaround I wanted. --Paul
     
    Pacman01, Aug 5, 2017
    #5
  6. 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? [​IMG]
     
    Wiley Coyote, Aug 5, 2017
    #6
  7. Pacman01 Win User
    Thanks, Clayton, even better! --Paul
     
    Pacman01, Aug 5, 2017
    #7
  8. How to redirect a file of input data in PowerShell?

    You are most welcome Sir. You have a good day...
     
    Wiley Coyote, Aug 5, 2017
    #8
  9. bro67 Win User
    Easier way to pull up command is just Windows key with the X key.
     
    bro67, Aug 5, 2017
    #9
  10. dalchina New Member
  11. Not on this machine since CU


    How to redirect a file of input data in PowerShell? [​IMG]
     
    Wiley Coyote, Aug 5, 2017
    #11
  12. Duyenhip Win User
    You can't hook a file directly to stdin, but you can still access stdin.Get-Content input.txt | ./program > output.txt
     
    Duyenhip, Apr 5, 2018
    #12
Thema:

How to redirect a file of input data in PowerShell?

Loading...
  1. How to redirect a file of input data in PowerShell? - Similar Threads - redirect file input

  2. How to redirect requests?

    in Windows 10 Software and Apps
    How to redirect requests?: Hello,Consider a program that communicates with a database server. The IP address is fixed in the program code hard coding and there is no access to the program source code. The IP address of the database server must be changed. What solution do you suggest for the...
  3. How to redirect requests?

    in Windows 10 Gaming
    How to redirect requests?: Hello,Consider a program that communicates with a database server. The IP address is fixed in the program code Hard coding and there is no access to the program source code. The IP address of the database server must be changed. What solution do you suggest for the...
  4. How do I redirect a folder programmatically? Specially Videos and Downloads? via Powershell?

    in Windows 10 Network and Sharing
    How do I redirect a folder programmatically? Specially Videos and Downloads? via Powershell?: How do I change the file location in windows 10? Here is how to do it manually: Specifically those files under This PC As I know how to edit quick access via registry: I have modified the location like so: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'...
  5. redirect to the receipt file

    in Windows 10 Software and Apps
    redirect to the receipt file: Hi, a little prob with code. I have a payment program and want to follow with the receipt. The following code is the receipt. 1) I've tried to redirect to the receipt file after payment. I have yet to achieve that. 2) I want the receipt# on the receipt. I swear, I'm trying...
  6. Redirecting files

    in Windows 10 Network and Sharing
    Redirecting files: I'm using windows 10. I was checking over a problem in my PC. I redirected downloads folder to desktop by error. Now I want to fix it. But I can't do anything. Please help. I don't want to reset PC as I am using official version....
  7. Redirect a system file problem

    in Windows 10 Support
    Redirect a system file problem: First post here for me - have lurked and used many tips over the years. I'm setting up a new computer with Win 10 Pro pre-installed (version 1903 Build 18362.356). It's a Dell Alienware Aurora R9. While changing the location of some of the system folders in my primary User...
  8. Saving files to redirected folders

    in Windows 10 Support
    Saving files to redirected folders: Good Morning; This relates to Windows 10. I've changed the location field in the properties dialog box from C:\Users\UserName\Documents (on ssd) to a new folder D:\Documents (on hdd). I feel a little silly to ask this but, which pathname do I use for saving documents? The one...
  9. Converting Excel Data to Powershell Script

    in Windows 10 Network and Sharing
    Converting Excel Data to Powershell Script: How would I go about converting Excel Data to Powershell Script? https://answers.microsoft.com/en-us/windows/forum/all/converting-excel-data-to-powershell-script/5c4fc5ae-3d65-4f9e-aef3-f6daad5910de"
  10. How to run batch file with powershell

    in Windows 10 Network and Sharing
    How to run batch file with powershell: I created a basic batch file that uses "net share" to share a local path. I saved the batch file. When I double click the file I get "access is denied"... note, I am logged on as a admin. Anyways... I figure it has to be run using power shell. I do not know much about...

Users found this page by searching for:

  1. powershell redirection input