Results 1 to 3 of 3

Thread: Replace text string using batch file

  1. #1
    Join Date
    Mar 2009
    Posts
    92

    Replace text string using batch file

    I have created batch file to change the varible name in to different format. Now i want to replace a character in a textfile and variable in batch file. If suppsoe = $/Batch Project: is the first line in text file. So is that possible to replace that : (colon) by slash (/).

  2. #2
    Join Date
    Dec 2008
    Posts
    177

    Re: Replace text string using batch file

    Code:
    C:\>set var== $/Batch Project:
    C:\>echo %var:~0,-1%
    = $/Batch Project
    C:\>set newpath=%var:~0,-1%/
    C:\>echo %newpath%
    = $/Batch Project/
    Code:
    C:\>echo = $/Batch Project: | sed "s/:/\//"
    = $/Batch Project/

  3. #3
    Join Date
    Apr 2008
    Posts
    3,295

    Re: Replace text string using batch file

    Flash Renamer renames many files at once by applying rules such as case convert, sequential numbering & seach/replace.

    Download Flash Renamer 6.20.5

Similar Threads

  1. Editing text file using a batch file
    By beelow in forum Software Development
    Replies: 8
    Last Post: 09-03-2010, 12:27 AM
  2. DSMOD from batch and text file
    By BUKSIS in forum Active Directory
    Replies: 2
    Last Post: 03-03-2010, 10:07 PM
  3. How to read string from a given text file using C# program?
    By Kasper in forum Software Development
    Replies: 5
    Last Post: 25-02-2010, 10:18 PM
  4. Batch Script Text file parse
    By tator.usenet@gmail.com in forum Windows Server Help
    Replies: 5
    Last Post: 25-03-2009, 02:12 AM
  5. Reading text string from text file (PHP)
    By Moderate in forum Software Development
    Replies: 3
    Last Post: 16-01-2009, 03:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,647,877.00743 seconds with 17 queries