how to replace text in files located on remote servers ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jmclej
Posts: 1
Joined: 02 Apr 2021 07:00

how to replace text in files located on remote servers ?

#1 Post by jmclej » 02 Apr 2021 07:06

Hello,
I need to replace all the occurrences of the text "http:\\toto.com\" to "http:\\toto-preprod.com\" in a list of files that I know but that are located on different remote servers.

server1 : C:\arbo1\...\file.config
server1 : C:\arbo2\...\file.config
server1 : C:\arbo3\...\file.config
server2 : C:\arbo4\...\file.config
server2 : C:\arbo1\...\file.config

I guess finding a replace function is easy but I have no idea how to connect to remote servers via a script (dos or powershell). For each server, the scriptg needs to ask for the credentials.
If it is not possible in a batch, I am OK for a C# solution.
Thanks

Amanullah3456
Posts: 2
Joined: 28 Jun 2022 00:11

Re: how to replace text in files located on remote servers ?

#2 Post by Amanullah3456 » 01 Jul 2022 05:55

i favorite batch copy over C$ , you don't wait to login by user. You can change the files on running systems or files lock on running sys ?

Post Reply