Way to do global replace on dir full of html files?

Discussion in 'Software' started by laurac, Jul 10, 2008.

  1. laurac

    laurac Private E-2

    I need to replace a string in a whole dir full of htm files - is there a way to do this from a dos run window? or any other way for that matter?
     
  2. akhilles

    akhilles First Sergeant

    Dreamweaver can do that in the Find & Replace box - do the current selection, current page, the whole folder or even whole site.
     
  3. PEBKAC

    PEBKAC Private First Class

    Thinking from a batch file perspective... Is the substring you want to replace at a specific location in each file name?

    Example:
    xxxxxxxStringToReplacexxxx.html
    xxxxxxxStringToReplacexxxx.html
    xxxxxxxStringToReplacexxxx.html

    Is the string delimited by a specific character?

    Example:
    xxx-StringToReplace-xxx.html
    xxxxxx-StringToReplace-.html
    -StringToReplace-xxxxxx.html

    ...Or is it completely random?

    Can you provide a few example file names?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds