5

I've created some files in Xcode. Now I want to copy some of them. How should I do that?

Currently, I copy them in Finder & copy those back into Xcode in order to work on them. There must be a better way.

cdespinosa
  • 20,661
  • 6
  • 33
  • 39
Tycho Pandelaar
  • 7,367
  • 8
  • 44
  • 70
  • Could you be a little more precise about where you want to copy them from (a project, a window, a file on disk) and to (a different place in the same project, a different project, etc.)? – cdespinosa Dec 12 '09 at 18:59

4 Answers4

4

I think (not on my Mac at the moment so this may be totally wrong) that "Add files to project" has an option for copying the files from their source location. At least, I recall doing this at some stage.

  • You are right. You can always copy new files into the project folder if there are not already in it. Xcode will pop up a window and ask you every time. – TalkingCode Jan 05 '10 at 09:19
3

Right click -> show in finder -> select file in finder -> right click -> select "Duplicate" menu

Edit: Previous answer was wrong, fixed in comments, thus the downvotes. Fixed now though.

Bjorn
  • 69,215
  • 39
  • 136
  • 164
  • 5
    No, all I want is to select a file in XCode, en duplicate that file. That should result in something like 'copy of filex.m' besides the file 'filex.m'. It's very strange that this is not possible in XCode. All other IDE's I've worked on had this feature. – Tycho Pandelaar Jan 05 '10 at 09:59
  • 1
    Right click -> show in finder -> select file in finder -> right click -> select "dpublicate" There you go. – Bjorn Jan 05 '10 at 17:10
0

Go to where it is stored locally. Then you can copy it from there.

Will
  • 3,004
  • 29
  • 43
0

Do you want to copy them between two projects? If so, open both projects and just drag the files out of the 'Groups & Files' view to the other project.

Or maybe this question helps you.

Community
  • 1
  • 1
Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143
  • Thanx, in the thread you've suggested, I found a do-able workaround: I can 'Save As' my files and give them a new name. For all other suggestions: perhaps I wasn't clear: I wanted to copy a file in the same project under the same group. I tried to ask how I could copy classFile1.m to copyOfClassFile1.m. – Tycho Pandelaar Dec 14 '09 at 11:44