tags:

views:

54

answers:

3

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.

A: 

I think you actually want version control. Try git or svn or mercurial.

apphacker
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.
P5ycH0
Right click -> show in finder -> select file in finder -> right click -> select "dpublicate"There you go.
apphacker
A: 

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.

Felix Kling
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.
P5ycH0
+1  A: 

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.

Tony van der Peet
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.
Holli