Questions tagged [copy-paste]

For issues relating to cut, copy, and paste operations.

The term "copy-and-paste" refers to the popular, simple method of reproducing text or other data from a source to a destination. It differs from cut and paste in that the original source text or data does not get deleted or removed. The popularity of this method stems from its simplicity and the ease with which users can move data between various applications visually – without resorting to permanent storage.

Source: Wikipedia

3477 questions
76
votes
10 answers

Paste MS Excel data to SQL Server

I have a bunch of rows in Excel that I want to paste into a new table in MS SQL. Is there a simple way ?
Bajji
  • 1,093
  • 4
  • 12
  • 20
71
votes
5 answers

copy all files and folders from one drive to another drive using DOS (command prompt)

i want to copy all files and folders from one drive to another drive using MS-DOS. How to do it? I am trying xcopy I:\*.* N:\ But it copies only files, not folders. So how to copy all files and folders both? Thanks.
gautamlakum
  • 11,815
  • 23
  • 67
  • 90
71
votes
13 answers

How can you get the clipboard contents with a Windows command?

For example, I can copy a file to the clipboard like this: clip < file.txt (Now the contents of file.txt is in the clipboard.) How can I do the opposite: ???? > file.txt So that the contents of the clipboard will be in file.txt?
Matt
  • 21,026
  • 18
  • 63
  • 115
70
votes
19 answers

New Line Issue when copying data from SQL Server 2012 to Excel

I recently upgraded to SQL2012 and am using Management Studio. One of my columns in the database has a CHAR(13) + CHAR(10) stored in it. When I was using SQL Server 2008, this would copy and paste completely fine into Excel. Now, however, copying…
MrPink
  • 1,325
  • 4
  • 18
  • 27
63
votes
11 answers

How to paste in the line where the cursor is?

The command p pastes below the cursor and P pastes above the cursor. What's the command to paste in the line where cursor is?
Kitcha
  • 1,641
  • 6
  • 19
  • 20
63
votes
13 answers

Copy-paste code from Visual Studio, but paste UNFORMATTED code

Is there any way to force Visual Studio to copy selected code to the clipboard as unformatted text? When I am copy-pasting code into Word or more often Outlook I have to do it via Notepad to get rid of the formatting...there has to be an easier way!
Richard Ev
  • 52,939
  • 59
  • 191
  • 278
62
votes
4 answers

Intercept paste event in Javascript

Is there a way to intercept the paste event in JavaScript and get the raw value, change it, and set the associated DOM element's value to be the modified value? For instance, I have a user trying to copy and paste a string with spaces in it and the…
Brandon
  • 10,744
  • 18
  • 64
  • 97
58
votes
11 answers

Prevent copying text in web-page

I've got quiz application. Where robot ask different questions in chat, this questions belong to different areas of knowledges. User that answered question first, receive points. The problem is, that some users googling answers. I want somehow…
Anton
  • 5,831
  • 3
  • 35
  • 45
54
votes
17 answers

How to disable copy paste option from UITextField programmatically

I am making a registration alertview that has a UITextField in it where the user can enter their registration number. everything is pretty much their, however I would like to remove the copy paste function from the textfield programmatically since…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
52
votes
12 answers

Copy text string on click

I want to to be able to copy a text string on click without a button. The text string will be inside a "span" class. User hovers over text string User clicks text string Text string is copied to clipboard
Matthew
  • 607
  • 2
  • 6
  • 12
52
votes
1 answer

Disable drop paste in HTML input fields?

Html FIle Disable drop paste in HTML input fields..
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
51
votes
4 answers

Disable copying entire line when nothing is selected in Intellij

I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before. This is really…
Alexandre Thenorio
  • 2,288
  • 3
  • 31
  • 50
49
votes
3 answers

How does Copy Paste of formatted text work?

I'm confused about what implements the functionality of copy and paste. This is exactly what I'm confused with: When I copy formatted text from MS Word (which uses a different markup language than HTML) and paste into an RTF editor in a web browser…
claws
  • 52,236
  • 58
  • 146
  • 195
49
votes
2 answers

Paste multiple times in Vim

This maybe really simple, But I tried searching and I ended up with stuff like copying multiple lines, cut and paste multiple lines etc. What am looking for is pasting a single line multiple times in Vim. For eg. A line 'X' is copied and I want to…
Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92
46
votes
5 answers

How to do copy/paste function programmatically in iphone?

I have a text-view with some text and a copy button in that view, When the user enters some text and presses the copy button, it needs to copy that text and paste that text wherever he wants. I know there is a default copy/paste menu-controller in…
ICoder
  • 1,347
  • 2
  • 13
  • 23