VideoHelp Forum

Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
  1. Hi ****

    I have a example.txt witch contanins:

    DV Output On=0
    DV Preview VGA=0
    DV Port=0
    single lines can have only 1 alphanumerical value, for example

    CurUsage can have only 2, or 3 or 0 or 9. Never 10 or -1 or 200

    and this is the same for other elements (PlaybackDisp, ForceRender, DV Output On etc..)

    they can only have a value between 0 and 9.

    I would like change single value by a batch file, for example I need to assign to Fullscreen the "1" value instead of 0.

    The batch have to recognize "Fullscreen" and change 0 ---> to 1

    Is it possible? thanks
    Quote Quote  
  2. I know the modifications you described can be done with Word VBA.
    I believe batch processing can also be done with Word VBA but I have never done it.

    Good luck
    Quote Quote  
  3. Assuming you know at least regular expressions you could use rxrepl to replace for example "Fullscreen=.*" with "Fullscreen=1".
    In general any script and programming language can do what you want, but that would require spending some time learning.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. you have to parse lines, knowing delimiters, in your case its "=" .
    Then you check for valid input.
    I abandoned batch script because it is not a good choice (only for simple tasks) and for windows only, you'd be better off with other languages, but I guess now it is too late, it was us who actually perhaps brought you to this.
    for /f "tokens=1 delims==" %%g in ('findstr /c:"PlaybackDisp" "your_text_file.ini') do SOMETHING_HERE
    something like that, not tested
    Quote Quote  
  5. not a btach script probably a more robust programming language...

    yes PERL is the first thing that comes to my mind
    Quote Quote  
  6. you can also do those text editors like emeditor notepad++ or ultraedit then do regex searches to do text substitution across files
    Quote Quote  
  7. I'd vote for Python.
    Quote Quote  
  8. I also vote for Python.
    Quote Quote  

Similar Threads