Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Profil Nicole23
Femeie
25 ani
Bucuresti
cauta Barbat
28 - 65 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [CMD] Replace Text In All VBS Files in Current Folder Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 8 ani
Postari: 931
Open Command Prompt in the desired folder and use one of the following commands to replace text.

1. Replace all occurrences of year 2025 with year 2026 (in my case both are stored as text, like this "2025" and "2026")

for %f in (*.vbs) do (powershell -Command "(Get-Content '%f') -replace '2025','2026' | Set-Content '%f'")

Source: ChatGPT

2. Replace only the first occurrence of the text (in my case these are stored as text, and each appear multiple times in the VBS files)

for %f in (*.vbs) do (powershell -Command "$c = Get-Content '%f' -Raw; $re = [regex]'1000'; $re.Replace($c, '5000', 1) | Set-Content '%f'")

Source: Gemini


pus acum 2 saptamani
   
Pagini: 1  

Mergi la