Hi I want create a script to modify a file text like this, I tried with a batch file but couldn't, can anyone give me advice on which language i should rely on to do this?:
@ECHO OFF
SETLOCAL
rem The following settings for the source directory & filenames are names
rem that I use for testing and deliberately include names which include spaces to make sure
rem that the process works using such names. These will need to be changed to suit your situation.
SET "sourcedir=C:\Users\dom19\Downloads\file.txt"
SET "filename1=%sourcedir%\q71207091.txt"
FOR /f "usebackqtokens=1*delims=: " %%b IN ("%C:\Users\dom19\Downloads\file.txt%") DO (
IF "%%b"=="Server" ECHO %%c
IF "%%b"=="MAC" ECHO %%c
IF "%%b"=="http" ECHO %%b:%%c
IF "%%b"=="00" ECHO %%c|FINDSTR /b "1a:79:" >NUL &IF NOT ERRORLEVEL 1 FOR /f "delims=;" %%e IN ("%%c") DO ECHO %%b:%%e
) >> "C:\Users\dom19\Desktop\script1.txt"
@dom1987 , hi, sorry cannot help wrt a pure windows (?powershell?) implementation, but if you have (or can install *nix tools - cygwin or equivalent ) a simple awk script will do the job
where is the 'Name' and the 'Poster' tag data coming from?
They're not in the sample input file you've provided.
Have you tried anything to achieve your objective yet?
I want to create 'Name' and the 'Poster' tags by default where Name is ascending and 'Poster' is always the same path for example "C: \ Users \ name \ Document \ logo.png"
To achieve my object not so which program to use. do you have a suggestion?
Sorry for my bad English