Copy filenames

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Copy filenames

Post by *Andre Linoge »

Goodmorning.
I was wandering if its possible to copy a file or files without the file-extension.
If not, is there perhaps an add-on availabe somewhere??

TIA
Andre Linoge
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Copy filenames

Post by *nsp »

Andre Linoge wrote:Goodmorning.
I was wandering if its possible to copy a file or files without the file-extension.
If not, is there perhaps an add-on availabe somewhere??

TIA
Andre Linoge
When you select multiple files and use copy, on the target window, you can change trailing *.* by *. or * this will do exactly what you need !
For a single file you just have to remove extension manually or change name file name by * or *.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

PoSh: Copy filenames to clipboard without the file-extension

Post by *Stefan2 »

Andre Linoge wrote: ...copy a file or files without the file-extension.
To copy the names to clipboard without the file-extension use a tool or a script like this:


Command : PowerShell
Parameters: GC '%L'|ForEach{If((GI $_).PSIsContainer){$_}else{If($_.IndexOf('.') -gt 0){$_.SubString(0,$_.LastIndexOf('.'))}else{$_}}}|clip



Code taken from viewtopic.php?p=329429#329429




There can be found many more example on the forum...

 
Post Reply