Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
Personally I'd love a cut and paste feature for files and folders, because very often when navigating through folders while holding something, suddenly a folder will refuse to spring open and I have to start all over. And no scrolling with the trackpad or mousewheel while holding a file or folder slows finder navigation down even more.
 
I thought I was dumb for googling this question. But this thread has been ongoing for four years. Well >_>
 
For those that want to be able to cut and paste, there are workarounds. After I saw this thread initially several weeks ago, I decided to make an exhaustive search to see if anyone had come up with anything. Anyway, there was a software solution that allowed a plugin to be used, but that was ended with Snow Leopard. I've come up with two ways:

First, and the one that's more of a pain, since it involves using the keyboard when pasting: Go here to get two programs, Shortcuts and OnMyCommand (OMC). Open OMCEdit, which is part of the OMC package.

You're going to need two scripts, one for cut and the other for paste.

For cut, the code is:
Code:
echo "__OBJ_PATH__" >/tmp/cut_${USER}

For paste:
Code:
cat /tmp/cut_${USER} | xargs -J % mv -f % __OBJ_PATH__ ; rm -f /tmp/cut_${USER}

These scripts were written By Fredrik Andersson (fan@gaffophone.com), 2003-11-05. I suppose he must be a developer for OMC.

Go to OMCEdit and make a new plist. Add the cut script to General>Command and save somewhere safe. Name it Cut Item(s), or whatever you want in Command Name (sorry forgot to mention that and didn't feel like rewriting). Do the same as above for paste, but call it Paste Item(s).

Now go back to OMCEdit, File>Import Commands and import Cut Items(s) so it will be added to the sample command "Hello World" on the left pane. Under General>Location make it Top Level and click Enabled if it's not already. You can unclick "Hello World," if you wish or even delete it, so it doesn't show up when you do the cut/paste operation. Do the same as above for Paste Item(s).

Quit OMCEdit and open Shortcut32 (Shortcuts, the 64 bit version doesn't seem to work for Finder operations, probably because it's not 64 bit). You need to assign a hot key to open the Paste operation, since the code wasn't written to have focus when not clicking on a folder. Assign a hotkey to Folder (I did file also, but it's probably not needed). I used shift-command-X and assigned the Paste Item(s) command to it. Go under Setup and click start, add, and add for the 3 items.

With that when you right click on a file (or files) you can choose to cut, and then paste them anywhere with the keyboard shortcut. FYI, you can also not have to use the shortcut, if you right click paste on a folder.

So, that one works anywhere.

Second, and the method that only uses a mouse (the one I like better), but can only be used in Finder, involves using AppleScript:

Code:
(*
Cut Files in Finder.scpt
Version 0.3

Author: Jayson Kempinger < evilglowingapple (at) gmail (dot) com >
Date: 19 April 2006

This script is released under the GNU Public License v2
The code for the error block for converting selected Finder items to POSIX paths (via aliases) used (mostly unmodified) from FileVault-proof Finder selection to alias list 1.2 at http://scriptbuilders.net/files/filevaultprooffinderselectiontoaliaslist1.2.html

Disclaimer.  Read before using this script!!!
*********************************************
This script carries no warranty, expressed or implied. The user assumes all risks, known or unknown, direct or indirect, which involve this software in any way.
This script uses the UNIX command 'mv' to move files in an attempt to add a cut files feature to Finder.  This command is quite powerful and unforgiving if invoked incorrectly.  As the script is fairly new and hasn't been fully tested, there is no guarantee that the script will select the correct files to move, and no guarantee the script won't accidently move your files to an unknown place, or worse, delete them.  From my preliminary testing the script has worked successfully, but I hold no responsibility if the script fails to act as intended.
If you do encounter any problems with this script, feel free to send me a bug report at my e-mail address listed above.  Send me any information you have about what happened as well as any Applescript error messages.  I may be able to improve the script for future versions.  Also please send me suggestions for how to make this script better (or feel free implement them yourself and e-mail me the code).

Instructions:
*************
Assign this script to run via a keystroke/mouse action/etc.  I recommend using Quicksilver's triggers to assign it to a key combination such as Command + Option + X.  You can also save this script as an application and run it from a convenient spot (Finder toolbar, Dock, etc).
The 'cut' operation consists of two steps:
1.  Select some files, run the script to set the list of files to be moved
2.  Open a Finder window in another location, run the script again to move the files previously selected to the location of this window (if files are selected here they will be set to the list of files to be moved and non of the previously selected files will be moved; they will just be ignored)
*)

--set this property to true to only copy the files (good for testing)
property debug : false
--set here only so that it can be available globally
property state_file : ""

on run
	--get state of script (select files || move files to target)
	do shell script "mkdir -p /tmp/`id -u`/"
	set state_file to do shell script "echo /tmp/`id -u`/cut_script_state"
	try
		do shell script "test -e " & state_file
	on error
		select_files()
		return 0
	end try
	
	move_files()
	return 0
end run

--get source files
on select_files()
	tell application "Finder"
		activate
		--gets list of selected items from Finder
		set selected to selection
		--unselect items to show that something was done (analog to greying out items in Windows)
		set selection to {}
	end tell
	--can't find a way to convert the entire list to aliases, so have to do it iteratively
	--set file_list to selected as alias
	set file_list to ""
	repeat with n in every item in selected
		try
			set path_n to get the POSIX path of (n as alias)
		on error errormsg
			--code for error block used (mostly unmodified) from FileVault-proof Finder selection to alias list 1.2 at http://scriptbuilders.net/files/filevaultprooffinderselectiontoaliaslist1.2.html
			
			-- if error, the item is FileVault-protected and the Finder can't coerce it into an alias
			-- the error message is parsed into a list containing the item's path components 
			
			
			-- first, all quote characters inside the item's path components' names in the error message
			-- are replaced by an unused marker string
			-- the marker string will later be used to reinsert these quote characters
			set markerString to "xyzabazyx" -- any palindrome string of only alfanumericals will do
			repeat while errormsg contains markerString
				set markerString to markerString & markerString
			end repeat
			set oldTIDs to AppleScript's text item delimiters
			set AppleScript's text item delimiters to {"\\\""}
			set theLst to text items of errormsg
			set AppleScript's text item delimiters to {markerString}
			set messageWithoutQuotes to theLst as string
			
			-- next, the string is parsed at the quote characters outside the item's path components' names
			set AppleScript's text item delimiters to {"\""}
			set theLst to text items of messageWithoutQuotes
			
			-- the item's path components are filtered and rearranged into the item's path 
			
			set idCounter to 1
			repeat with i in (items 2 thru -4 of theLst)
				if idCounter is 1 then
					set idCounter to 0
					try
						set pathString to i & ":" & pathString
					on error
						set pathString to i
					end try
				else
					set idCounter to 1
				end if
			end repeat
			
			-- finally, all quote characters inside the item's path components' names are reinserted by 
			-- replacing the marker string	
			set AppleScript's text item delimiters to {markerString}
			set theLst to text items of pathString
			set AppleScript's text item delimiters to {"\""}
			set pathString to theLst as string
			set AppleScript's text item delimiters to oldTIDs
			
			
			-- the item's path string is coerced into its alias without the Finder  
			
			try
				set path_n to get POSIX path of (pathString as alias)
			on error
				set path_n to get POSIX path of ((pathString & ":") as alias)
			end try
		end try
		--trim off trailing '/' if there (can appear if using FileVault fix above)
		if last character of path_n is "/" then set path_n to characters 1 through ((length of path_n) - 1) of path_n as string
		--need to escape any spaces so mv command doesn't fail with files with spaces in them
		set path_n to quoted form of path_n
		set file_list to file_list & path_n & " "
	end repeat
	--write files to tmp file if there are any files
	if not file_list is "" then
		do shell script "echo \"" & file_list & "\" > " & state_file
	end if
	
	return 0
end select_files

--files have been selected, now move them to selected folder
on move_files()
	--target path is front window
	tell application "Finder"
		activate
		set target_folder to (the target of the front window) as alias
		set selected to selection
	end tell
	--check if files are selected, if so, call select_files to redo file selection
	if selected is not {} then
		display dialog "reselecting files"
		select_files()
	else
		--nothing selected, let's paste
		set target_folder to get POSIX path of target_folder
		set target_folder to quoted form of target_folder
		--load file names back into array
		set file_list to do shell script "cat " & state_file
		--move files to target dir
		try
			if debug then
				--note, there will be no progress of the copy
				do shell script "cp -R " & file_list & " " & target_folder
			else
				do shell script "mv " & file_list & " " & target_folder
			end if
		on error errormsg
			--if same folder as source will show here.  Prompt user to select another folder and don't clean up
			set temp to do shell script "echo \"" & errormsg & "\" | grep -c \"are identical (not copied).\""
			if temp is "1" then
				--prompt to select another directory
				display dialog "Cannot move files to the same directory, please select another folder and run this script again." buttons {"OK"} default button 1
				return 1
			else
				--something else went wrong, show error and delete state_file
				cleanup()
				display dialog "Error encountered while attempting to move file:" & return & errormsg buttons {"OK"} default button 1
				return errormsg
			end if
		end try
		cleanup()
	end if
	
	return 0
end move_files

--delete temp file
on cleanup()
	return do shell script "rm -f " & state_file
end cleanup

Thanks to Jayson Kempinger < evilglowingapple (at) gmail (dot) com for this.

Just paste that in the AppleScript editor, save it as an application with whatever file name you want, and then drag it to the right of QuickLook and Action in the Finder window. With that you can then click on any files in Finder, click the app, they'll be cut (but still there like Windows cut), and then you can go to another window in Finder, click the app again, and the file(s) will be pasted.

so, there you go. Hate it or love it.

-aggie-
 
MacWorld's less elegant options:

From the February issue...

Spring-loaded folders - already discussed in this thread

Spring-loaded Dock and Sidebar items - quite similar

Aliases on the Desktop - for frequently used folders

Copy and Go - Select the item and do Copy (cmd-c) then press cmd-shift-g while in the Finder. This brings a Go To The Folder window to the front. Type in the path you want to open, and click OK. That folder opens, and you can move the item into it.

Recent Folders - Lame. A wing and a prayer. The target folder might not be one of the 10 listed.

I don't find their "Copy and Go" instructions very clear at the end. Haven't tried it.
 
Cut and paste files using Automator and Applescript

Here is a solution I came trying to get the most seamless workflow as possible using the keyboard (which is basically what is already provided under Linux or Windows... sigh.).

It simulates the File Cut and Paste by using the clipboard:
1) Cut copies the path of the selected file to the clipboard as a POSIX path
2) Paste moves the file which name is in the clipboard to the current directory

Advantages:
- Can be assigned shortcuts (cmd-shift-X for cut, cmd-shift-V for paste) to obtain pure keyboard copy/paste
- Uses applescript's API to Finder: exactly the same behaviour as if you drag-n-drop the file, with Cancel ability. There is no UNIX mv or intermediate directory where you could lose your file.
- Simple design: the file to move is known by its filename in the clipboard. Can be used to transfer easily the filepath to/from any terminal or script editor.
- Change your mind: using applescript also provides Cancel ability in the Finder "Edit" menu. Moreover the new path of the file is copied to the clipboard, which allows you to move it again if you change your mind.

Still needs some polish
- Only one file can be cut/pasted at one time (the approach of barhar could be used for handling multiple files)
- No error handling: for instance, if the target file already exists, the script hangs, but does not provide explicit information neither propose to rename.
- Uses some shell commands to get the basename of the file. Anybody knows if there is an equivalent in applescript ?

Thanks to Magilum for pointing out the applescript move function (http://macosx.com/forums/howto-faqs/271436-move-selected-files-new-folder.html)

In Automator, create a new "Service", then "Execute an Applescript", and paste the following code in the box:

Script "Copy filename to clipboard"
Code:
on run {input, parameters}
	tell application "Finder"
		set sel to the selection as text
		set the clipboard to POSIX path of sel
	end tell
  return input
end run
Declared in Automator as a Service "File or Folder" for "Finder.App".
Assigned a shortcut in System Preferences: cmd-shift-X

Script "Cut-Paste file into current directory from clipboard"
Code:
on run {input, parameters}
	
	set theFileP to the clipboard as text
	set theFile to POSIX file theFileP
	set onlyFileP to do shell script "basename '" & theFileP & "'"
	
	tell application "Finder" to set the theFolder to (folder of the front window) as text
	set theFolderP to POSIX path of theFolder
	
	-- move file theFile to theFolder
	set the clipboard to theFolderP & "" & onlyFileP
	tell application "Finder" to move theFile to theFolder
	
	-- display dialog (the clipboard)
	
	return input
end run
Declared in Automator as a Service "No input" for "Finder.App".
Assigned a shortcut in System Preferences: cmd-shift-V
 
Get Path Finder

Download Path Finder:
http://www.cocoatech.com

It's Finder on steroids. There's a thing called a "Drop Stack" that lets you drag file(s) to it, browse elsewhere and drag them out. It seems to be a pretty good compromise to this whole problem. Although I still find it silly that a product like this even NEEDS to exist when these are pretty basic functions that Mac should've just built into their OS in the first place. I mean, out of the box I have Garage Band which is far more complex than cutting and pasting a file!!

I've been a windows user since Windows 3.1. I recently bought a MacBook and I use both platforms at work and home. This has got to be one of the most annoying limitations of Mac file utility. "Loss of data" is the silliest excuse I've seen on these boards. Today's computers should be smart enough to handle something like this.
 
Although I still find it silly that a product like this even NEEDS to exist when these are pretty basic functions that Mac should've just built into their OS in the first place. I mean, out of the box I have Garage Band which is far more complex than cutting and pasting a file!!

I've been a windows user since Windows 3.1. I recently bought a MacBook and I use both platforms at work and home. This has got to be one of the most annoying limitations of Mac file utility. "Loss of data" is the silliest excuse I've seen on these boards. Today's computers should be smart enough to handle something like this.

As you can see from the fact you're reviving a dead thread, it's only the occasional person who cares. I've never wanted nor needed this option, and I'd guess the large majority of OSX users couldn't care less either.
 
I'm pretty sure you're wrong forcefieldkid. I switched from Linux last year and I ended up buying Path Finder. I find Finder to be archaic and unintuitive when compared to the other applications that I first got introduced to.

I also think that not being able to change the LH Finder pane font size is something else that needs attention.

In my opinion file cut/paste is quite a basic requirement - and the fact that so many of us perceive Cmd-X as the intuitive approach proves that something is amiss.
 
I'm pretty sure you're wrong forcefieldkid. I switched from Linux last year and I ended up buying Path Finder. I find Finder to be archaic and unintuitive when compared to the other applications that I first got introduced to.

I also think that not being able to change the LH Finder pane font size is something else that needs attention.

In my opinion file cut/paste is quite a basic requirement - and the fact that so many of us perceive Cmd-X as the intuitive approach proves that something is amiss.

The pane font size is a different issue, and though it doesn't bother me I can see why that would be needed/wanted by some.

I don't mind being proved wrong in the Cut+Paste thing, like I said Ive never wanted it, so if its added its no big thing to me. But surely if it was such a huge deal, it would be all over the forums on here and not once every couple of months or so in one thread in a small section of the site?
 
Perhaps people cannot be bothered to send out a message "hey, I cannot cut and paste!" :)

The colleague next to me just bought and used a Mac for the first time last week and is actually complaining about the exact same thing.

Niel
 
As you can see from the fact you're reviving a dead thread, it's only the occasional person who cares. I've never wanted nor needed this option, and I'd guess the large majority of OSX users couldn't care less either.

The majority of die hard Mac OS users don't care less. However, the only reason why Apple is doing so well these last 10 years is because many Windows users migrated over to Macs. And I can assure you that the vast majority of Windows users finds this to be a major annoyance. I have converted many friends and colleagues over to the Mac, and this is a common question that gets asked. We are all willing to learn Mac's way of doing things, but as far as this issue is concerned, there is a clear deficiency and it's my personal wish that Apple (and its fans) recognised this.
 
The majority of die hard Mac OS users don't care less. However, the only reason why Apple is doing so well these last 10 years is because many Windows users migrated over to Macs. And I can assure you that the vast majority of Windows users finds this to be a major annoyance.

Good for them. As I and others have said repeatedly in other threads, you can either deal with it, buy a program like Pathfinder to add this functionality, or go back to Windows. It's a moot point- you either take steps to resolve this percieved deficiency or you don't. Complaining about it isn't going to change anything.

We are all willing to learn Mac's way of doing things, but as far as this issue is concerned, there is a clear deficiency and it's my personal wish that Apple (and its fans) recognised this.

We recognize that in your opinion lack of copy/paste is a shortcoming, we just don't agree with it.
 
Changing the Name

As someone who uses both platforms daily (but greatly prefers his Mac), I can understand the frustration that someone with Windows-only experience would face when making the switch and finding a "standard" feature gone. And, I'm OK with Apple adding the feature...

But, anyone who says that cutting and pasting a file is intuitive is wrong. It's not intuitive at all - it's learned. And, with repetition, a learned thing becomes natural and people forget that it wasn't originally intuitive. And Apple prefers intuitive. In the real world (outside of a computer), there is no equivalent to cutting an entire file, let alone pasting an entire file. You would just move the file from one hanging file folder or drawer to another.

Not to mention the introduction of the logical inconsistency already mentioned that "sometimes cut means it's cut, and sometimes cut means that it's targetted to be cut when I paste."

So, while I personally have no desire for Apple to implement the cutting and pasting of a file, I'd be OK with them doing so IFF the functions had different and more appropriate labels, such as "Pick Up" instead of "Cut" and "Drop" instead of "Paste". And, this shouldn't be tough to do. If a user selects text (such as a part of the name of the file), the Edit menu can contain the standard options of Copy, Cut, and Paste. If a user selects a file, those options in the Edit menu change to Copy, Pick Up, and Drop.

Would that compromise alleviate concerns on all sides of the issue?
 
That is one of my pet peeves with OSX - what makes it even worse is that they don't have the option to snap windows to the side so that you can easily move files whilst holding down the command key.

It requires me opening a new finder window with Cmd+N, then dragging it to the right, resizing it, possible resizing the original window, and then moving it the new folder.

Though it is easier if you want to move it to a directory like downloads or movies or pictures as you don't need a second finder for that.
 
That is one of my pet peeves with OSX - what makes it even worse is that they don't have the option to snap windows to the side so that you can easily move files whilst holding down the command key.

There's an app for that. Wish I remembered the name of it, but maybe you can find it if you search for it.
 
It requires me opening a new finder window with Cmd+N, then dragging it to the right, resizing it, possible resizing the original window, and then moving it the new folder.

If the new window you open is in an awkward position, maybe most of it is overlapping the original, when you drag the file into it, it pops
to the front though, allowing you to drop it in a full window.

I believe the snapping windows is also new in Windows 7 right? At least they're using it in their commercials, I don't use it enough to know for sure. Mac OS is the older OS at the moment, and I'd imagine little tricks like this, and probably a lot more (heh) will be in the works for 10.7.
 
If the new window you open is in an awkward position, maybe most of it is overlapping the original, when you drag the file into it, it pops
to the front though, allowing you to drop it in a full window.

I believe the snapping windows is also new in Windows 7 right? At least they're using it in their commercials, I don't use it enough to know for sure. Mac OS is the older OS at the moment, and I'd imagine little tricks like this, and probably a lot more (heh) will be in the works for 10.7.

Hopefully :p

Resizing the window is more for navigation though - but it is not a big thing. The benefits of OSX outweigh the costs. OSX's user interface is pretty much as old as Vistas (as SL didn't change the interface) so it's really incredible at how good it still is.

Yep, window snapping is the 'new' thing for W7.
 
It's a moot point- you either take steps to resolve this percieved deficiency or you don't. Complaining about it isn't going to change anything.

We recognize that in your opinion lack of copy/paste is a shortcoming, we just don't agree with it.

The steps I am taking is to voice my opinion along with others, on the off chance that Apple will do something to rectify what we deem as a deficiency.

You don't have to agree with me. You are free to say you don't need it to counter the opinion and that's fine. No one is forcing you to support the proposed feature. But I do need you to shut up and let me have my say. Is that clear?
 
Just got to add my voice to the chorus. Apple needs to shape up and fix their file browser, this is just one of many deficiencies and a pretty basic gap in functionality at that.

On Linux, whatever windowing environment or file browser you use, cut and paste is just fundamental. Same in Windows, same in shells and command lines. Moving a file is just something one does. In fact, it sometimes requires less effort to move a file than copy it because it can often just update file system references instead of copying any data!

I actually sometimes still use Windows... just so that I can move and organise my file systems. It's essentially impossible using the drag and drop of Finder.

There is no safety net with drag and drop, if you accidentally release the mouse button you could lose your files in amongst files in another directory.

I came to OSX expecting it to be as amazing as the fan boys claimed. I was open to learning new ways of doing things, but this is just one example where there is no better way... instead there's just a more tedious and annoying way.
 
In the real world (outside of a computer), there is no equivalent to cutting an entire file, let alone pasting an entire file. You would just move the file from one hanging file folder or drawer to another.


And in the real world, that wouldn't leave your original folder in the original hanging file folder as well, should that be in a different cabinet.
Analogy FAIL :D
 
And in the real world, that wouldn't leave your original folder in the original hanging file folder as well, should that be in a different cabinet.
Analogy FAIL :D

Hehe. Took me a bit to figure out that you were talking about the different cabinet being an external drive. You are correct that the default behavior there fails the analogy, but the "file" analogy has held up pretty well over the 25 years. It's not the analogy that fails - it's that one behavior that fails.

However - dragging to an external drive might be more appropriately equivalent to giving a file to someone else to file in another office. (It is, after all, much more likely to have duplicate files across offices than within the same office. So think of each drive is its own office.) The default would be to give that person a copy of your file - not your original file. As we all know how dangerous it is, in the real world, to not keep your own paper trail. So, the Mac ensures that you'd have to make a conscious decision to "give up" having a copy in your own office by holding down the command key.

In any case, it's still more intuitive than "cut" and "paste". Speaking of which, rather than finding the behavior that (somewhat) falls outside of the analogy, what did you think about my compromise of having the functionality, but having the words "cut" and "paste" replaced with "pick up" and "drop"?

;)

And, on a side note - why is it that most Windows programs and the file system still do not have "Duplicate" commands in the Edit menu? I was on my Windows machine this morning and realized how silly it was to copy and paste a file in the same folder to make a duplicate of it.

Hmmmmmm...
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.