Tricky clipboard request?

  • Thread starter Thread starter Dos-Man
  • Start date Start date
D

Dos-Man

Is it possible to delete files and folders that have been
cut to the clipboard by an explorer window?

They become translucent after you "cut" indicating they
are on the clipboard.

There must be some type of program that can clear them. I can
clear the clipboard, but the file comes back.

I'm using Win 98.

Dos-Man

___________________________________________________________________

Author of PSassano's Legacy Pad text editor
 
Dos-Man wrote on 11 mrt 2004 in alt.comp.freeware:
Is it possible to delete files and folders that have been
cut to the clipboard by an explorer window?

They become translucent after you "cut" indicating they
are on the clipboard.

There must be some type of program that can clear them. I can
clear the clipboard, but the file comes back.

Just copy [ctrl-C] something else, a piece of text, or anything.

They reappear on their original location,
since they are not cut jet,
only selected for cutting and moving.

Deleting is by delete [alt-delete key]
 
Dos-Man wrote in said:
Is it possible to delete files and folders that have been
cut to the clipboard by an explorer window?

They become translucent after you "cut" indicating they
are on the clipboard.

There must be some type of program that can clear them. I can
clear the clipboard, but the file comes back.

Good thing they do, otherwise we would sure miss a lot of files.
But no, don't think this is possible. If memory serves (have read
about this once upon a time) windows does not copy the actual file,
only information about it (path) - and only performs the actual move
operation when you past that info into another directory. If you
forget, file is still there - only the info for the pending move
operation is gone. File is "grayed" out while the info is still on the
clipboard, to remind you it is still there. I'm sure others will
correct me if I am wrong.

All the best,
Bjorn Simonsen
 
Is it possible to delete files and folders that have been
cut to the clipboard by an explorer window?

They become translucent after you "cut" indicating they
are on the clipboard.

There must be some type of program that can clear them. I can
clear the clipboard, but the file comes back.


This can be done with AutoHotkey via the following script. This assigns the
hotkey Shift-Control-X to clear the clipboard (and it assumes you just want
to get the files OFF the clipboard). It should cause the files to become
normal (non-translucent) again:

+^x::clipboard =

If you want to delete the files themselves: In this example, the Win-8
hotkey will prompt you to delete each file that exists on the clipboard (as
copied in the Explorer via Ctrl-C or Ctrl-X).

#8::
IfEqual, clipboard, , Return ; clipboard is empty

files = %clipboard%

Loop
{
StringGetPos, newline_pos, files, `r`n
if ErrorLevel <> 0 ; No more files
break
StringLeft, NextFile, files, %newline_pos%
Gosub, DeleteNextFile
; Add 2 so that the next line will remove the CR+LF too.
newline_pos += 2
StringTrimLeft, files, files, %newline_pos%
}
; Only the last file remains:
NextFile = %files%
Gosub, DeleteNextFile
return

DeleteNextFile:
MsgBox, 4, , Delete "%NextFile%"?
IfMsgBox, NO, return
FileDelete, %NextFile%
if ErrorLevel <> 0
MsgBox, Could not delete file "%NextFile%" (perhaps it is a directory?)
; Note: The FileRemoveDir command can be used to delete folders
; (and optionally all their contents too).
return


AutoHotkey is an open source, simple hotkey & script making language that is
backward compatible with AutoIt v2.
http://www.autohotkey.com
 
Is it possible to delete files and folders that have been
cut to the clipboard by an explorer window?

They become translucent after you "cut" indicating they
are on the clipboard.

There must be some type of program that can clear them. I can
clear the clipboard, but the file comes back.


--- I think "Hamsin clipboard " will do what you want , it can be set
to restore the clip to the old clip (after you paste)...
http://www.iisr-cnc.com/hamsin/
 
Back
Top