Batch file or Powershell script to create a configuration file based on truncated computername

Færdiggjort Opslået 6 år siden Betalt ved levering
Færdiggjort Betalt ved levering

The attached batch file creates a configuration file based on the computer name. I need it modified to edit the computer name variable so that if the name starts with "PC", the name is truncated to 7 characters. Otherwise, it is truncated to 5 characters.

So, PC12345 => PC12345, PC1234567 becomes PC12345, WM123 => WM123, WM123456 becomes WM123

I prefer a solution that does not require Powershell or VB.

Bash Scripting Powershell Scripting Windows Skrivebord

Projekt ID: #16628724

Om projektet

6 bud Remote projekt Aktiv 6 år siden

Tildelt til:

AdrianCJ

Hello, I fixed the batch, now it truncates the name based on the computer name. You can have it right away. Thank you :)

$20 USD på 1 dag
(3 bedømmelser)
1.5

6 freelancere byder i gennemsnit $27 timen for dette job

vano101

Hello I would like to investigate for a little, meantime I believe it should be pretty easy project.....

$30 USD in 2 dage
(417 bedømmelser)
6.5
AhmadSameer

Hey All you need is to edit the computer name to be 7 characters if it starts with "PC" and to be 5 characters if it starts with anything else? Do you need anything else? I can help

$30 USD på 1 dag
(5 bedømmelser)
2.8
dfabretti

Hi there! My name is Douglas and I have been working as an Automation Developer for the last 5 years. I mainly develop using Powershell scripts and I believe that what you need is basically what I do on a daily bas Flere

$25 USD på 1 dag
(5 bedømmelser)
3.0
rajputankit26

Hi, Having 9 years of experience in Information technology whoch includes windows and linux as well as network operations management. Have worked on various powershell scripting and schedule windows batch files as wel Flere

$35 USD in 2 dage
(0 bedømmelser)
0.0