need to add computer name to existing file

Chris Mathis 1 Reputation point
2022-04-09T11:56:42.433+00:00

I have a file, let's call it C:\temp\test.txt, I need to be able to fun a command to add the computer name to it.

Computer Name: LT-Test-W10

the file would need to go from C:\temp\test.txt to C:\temp\LT-Test-W10 - test.txt

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,663 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. T. Kujala 8,706 Reputation points
    2022-04-09T12:49:42.69+00:00

    Hi @Chris Mathis ,

    Could be this helpful for you?

    0 comments No comments

  2. Chris Mathis 1 Reputation point
    2022-04-09T13:22:43.357+00:00

    Unfortunately, no. I don't need it in the file but as part of the file name. I figured out a way to do it and it provide the results I want. Thank you for looking.

    0 comments No comments