Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to do multiple and different copy paste in same document?

In same document I need to do some changes.

All changes are different. Is there any way to do this quickly?

I need to do this in 300+ document.

Edit:

For example

I want to change this

function aout0() {
    out("0", 100, "This text is different in each file", "");
}
function aout1() {
    out("1", 200, "This text is different in each file", ""); 
}
function aout2() {
    out("2", 300, "This text is different in each file", "");
}
function aout3() {
    out("3", 400, "This text is different in each file", "");
}
function aout4() {
    out("4", 500, "This text is different in each file", "");
}
function aout5() {
    out("5", 600, "This text is different in each file", "");
}
function aout6() {
    out("6", 700, "This text is different in each file", "");
}

into this

function aout0() {
    out("0", 0, "This text is different in each file", "");
}
function aout1() {
    out("1", 136, "This text is different in each file", "");
}
function aout2() {
    out("2", 272, "This text is different in each file", "");
}
function aout3() {
    out("3", 408, "This text is different in each file", "");
}
function aout4() {
    out("4", 544, "This text is different in each file", "");
}
function aout5() {
    out("5", 680, "This text is different in each file", "");
}
function aout6() {
    out("6", 816, "This text is different in each file", "");
}
share|improve this question
    
hmm, you mean something like an AI system that will figure out the required changes for those 300+ files? how about some details buddy. –  nik Jun 3 '10 at 7:03
    
Do you really mean copy/paste or does search/replace better describe your requirement? Also, what is the document format? An example will help us help you. –  Mike Fitzpatrick Jun 3 '10 at 8:09
    
@Mike- it's a part of long JavaScript document –  metal gear solid Jun 3 '10 at 8:14
    
@Mike - I want to select all instances ( like we do using control) in same file where i need change and then paste required amends in each place , in as less as possible steps –  metal gear solid Jun 3 '10 at 8:17
    
Am I understaning you? You want to do multiple replacements in several different areas of text within each file but not necessarily ALL text of each file. You plan to open each file, select multiple sections of text and apply the replacements - as efficiently as possible. –  Mike Fitzpatrick Jun 3 '10 at 8:52

2 Answers 2

this is a classical problem for an old tool called 'sed'. you pipe text through this tool and can modify the text on its way out. you can get a version for windows here. to fix one of your lines:

 % sed -i -e 's/out("0", 100/out("0", 0/' *.js

and repeat this for all of the patterns you want to change. you can also combine all of your relevant patterns into a .sed - file and apply them all at once.

share|improve this answer
    
how to use this –  metal gear solid Jun 3 '10 at 8:46
2  
Akira has given you a command line, you need to download sed for Windows XP and run it from the command prompt. –  ta.speot.is Jun 3 '10 at 8:56
1  
ah, the web2.0 dudes these days :) –  akira Jun 3 '10 at 9:08

Perhaps you need a clipboard manager like Ditto?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.