copy sfn - short file name/path

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
User avatar
frax
Posts: 58
Joined: 23 Apr 2007, 07:24
Location: Stockholm, Sweden
Contact:

copy sfn - short file name/path

Post by frax »

Hi, I am using a legacy application a lot, that is cross platform etc. Unfortunately it doesn't support long file names and paths fully on windows - at least not ones that have spaces in them.

I would love to be able to copy the sfn version of a long filename, e.g. so that c:\documents and settings is copied as c:\docume~1

...and that wouldn't be that hard to implement, would it... ?

:)

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5197
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Post by Jan Rysavy »

Hi, one workaround: Ctrl+Shift+Space, Ctrl+Shift+Enter, Ctrl+A, Ctrl+C

nice combo ;-)

Klettermaxe
Posts: 32
Joined: 14 Jan 2006, 11:39
Location: Essen, Germany
Contact:

Post by Klettermaxe »

Hi frax,

this might be a solution for your problem:

1) Download and install the powerful freeware autoit3 (http://www.autoitscript.com/autoit3). This will do no harm to your system. The extension .au3 will be associated with autoit afterwards.

If you don't want to install the whole package: The only file you really need is the file autoit3.exe, but you should associate .au3-files with autoit for easier handling.

2) Create a text file with the extension ".au3" in a directory of your choice, e.g. "d:\data files\dospath.au3". The content of this file is only a single line:

Code: Select all

ClipPut ($CmdLine[$CmdLine[0]])

3) In Salamander, create a new user menu entry and name it e. g. "DOSPath". Provide the following details:

Command: d:\data files\dospath.au3
Arguments: $(DOSFullName)
Initial Directory: $(FullPath)

Uncheck "Execute through shell"

Choose an icon of your liking. Make sure that the option "Show item in User Menu Bar" is checked. Of course the user menu toolbar must be visible.

4) Now, when you click on the icon in the user menu bar, the DOS 8+3 path and name of the highlighted file will be copied to the clipboard (without the trailing space you get with Jan's workaround)

User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Post by th. »

This is similar to what Klettermaxe suggested but with the help of a litte freeware tool called winclip.exe (find it at http://www.dmst.aueb.gr/dds/sw/outwit).
Put it somewhere on your computer e.g. d:\tools\winclip.exe and create a user menu item like this:

Command: echo
Arguments: $(DOSFullName)|d:\tools\winclip -c
Initial directory: $(FullPath)

Execute through shell: checked
Open shell window: unchecked

therube
Posts: 634
Joined: 14 Dec 2006, 06:22

Post by therube »

Untested.

Ninotech Path Copy 4.0

Ninotech Path Copy is a shell extension for Windows 95, 98, NT4, 2000, and XP that enables to copy the path of a file or directory to the Clipboard. You can then paste the path in to your document, e-mail, etc. You copy the path of a file or directory by right-clicking it in the Windows Explorer and choosing Copy Path from the context menu. The context menu then offers nine standard ways of copying the path, in addition to the user defined copying methods that you create yourself:


PS: SvA had asked a question here. Maybe he'll repost it.
WinXP Pro SP3 or Win7 x86 | SS 2.54

User avatar
SvA
Posts: 468
Joined: 29 Mar 2006, 02:41
Location: DE

Post by SvA »

My former post got lost with the restore. This is a repost from memory as therube requested.

frax, was your request about copying the path name, in it's 8.3 format to the clipboard, or was it about copying to to the filesystem?

Concerning copying directory trees, preserving both long and short filename, I have been looking for a solution for a long time, but have not yet found one. This however, was an important feature for backup and system migration, in order to not break aplications that store short file/path names in their configuration or use short filenames to link documents/resources.

Even most (if not all) backup programs are unable to restore the original short filename. The only solution to the problem, known to me, are disk imaging programs.

So, if Altap could find and implement a solution to this, this was a feature which would set appart Altap Salamander from all the rest of the bunch of file managers.

There are solutions to copy a tree of files and directories just using the original short filename, stripping the long filename. I'd use Microsoft's Robocopy for the task. You can use one of the GUIs for it if you don't like command line programs (especially one with such a welth of commands and options).

therube
Posts: 634
Joined: 14 Dec 2006, 06:22

Post by therube »

WinXP Pro SP3 or Win7 x86 | SS 2.54

Post Reply