copy file's short name (DOS 8.3) to clipboard with full path
Moderators: white, Hacker, petermad, Stefan2
copy file's short name (DOS 8.3) to clipboard with full path
Could not find any internal command or other solution to copy a file's short name (in DOS-format 8.3) to a clipboard with or without full path.
No a single word in the Manual neither here at forum. Have I missed anything? I can't believe me to be the first, who needs it.
No a single word in the Manual neither here at forum. Have I missed anything? I can't believe me to be the first, who needs it.
Re: copy file's short name (DOS 8.3) to clipboard with full
Use the new beta and something like this as button command:leopoldus wrote:Could not find any internal command or other solution to copy a file's short name (in DOS-format 8.3) to a clipboard with or without full path.
Code: Select all
cm_SwitchLongNames,cm_CopyNamesToClip,cm_SwitchLongNames
2white
But what about copying the full path, including short names of the folders?
As far as I know, TC can not copy short names of files immediately after switching from long names format - and visa versa. In order to get the correct path, you need to go through the whole path from the root folder to your file after you switch to alter name format, otherwise you will get some ugly hybrid of long and short names. Am I right?
2MVV
I see, thanks. It should work to copy short names without paths.Use the new beta and something like this as button command:
But what about copying the full path, including short names of the folders?
As far as I know, TC can not copy short names of files immediately after switching from long names format - and visa versa. In order to get the correct path, you need to go through the whole path from the root folder to your file after you switch to alter name format, otherwise you will get some ugly hybrid of long and short names. Am I right?
2MVV
I'll try this tool, thanks.Using a tool like TCMC of TCFS2 it is possible with any TC version.
Yes, you are right. Forgot about that. Also, a selection of multiple files is lost after cm_SwitchLongNames.leopoldus wrote:But what about copying the full path, including short names of the folders?
As far as I know, TC can not copy short names of files immediately after switching from long names format - and visa versa. In order to get the correct path, you need to go through the whole path from the root folder to your file after you switch to alter name format, otherwise you will get some ugly hybrid of long and short names. Am I right?
You can use command "cd" and parameter "%p" to go to path with short names.
But it seems you can not use command "cd" and parameter "%P" to go to path with long names.
There seems to be a bug somewhere when you execute the following commands sequentially:
cm_SwitchLongNames
cd %p
cd %P
cm_SwitchLongNames
After this, use the Go back and Go forward buttons to see the history list is messed up.
EDIT:
Bug report: here
EDIT 2:
Doesn't seem to be a bug. See above mentioned thread.
Last edited by white on 2013-09-08, 16:14 UTC, edited 2 times in total.
Button code (Copy code to clipboard, paste into button-bar, adapt the nircmd-path): http://www.nirsoft.net/utils/nircmd.html
Regards
Holger
Code: Select all
TOTALCMD#BAR#DATA
C:\Tools\NirSoft\nircmd.exe
clipboard readfile "%l"
WCMICONS.DLL,45
Selected Files to Clipboard (8.3 DOS Names)
-1
Regards
Holger
leopoldus,
Please check it once again:
Please check it once again:
Code: Select all
Command: X:\Path\To\nircmd.exe
Parameters: clipboard readfile "%l"
Posting the content of the Command field from your button would help to analyze your problem.I've checked the path twice
Okay, do it manual:
- Drag&Drop nircmd.exe on a free place of the button bar
- Context menu of the new created button -> Change...
- Parameter:
Code: Select all
clipboard readfile "%l"
Holger
2HolgerK
BTW, I've checked it now at another machine. Here it does not anything at all, even does not open Explorer window.
Here is a copy of my buttons's fields "command" and "parameter"Posting the content of the Command field from your button would help to analyze your problem.
Code: Select all
"D:\Nirsoft\Nircmd\nircmd.exe"
clipboard readfile "%1"
2leopoldus
You used the number 1 instead of the lowercase L in %l.
You used the number 1 instead of the lowercase L in %l.
Code: Select all
1 does not equal l, although it looks the same in a code block
Thanks again!
Well, the only small sub-case still is not solved is copying several selected filenames in 8.3 format without paths.
I've reread now you post above and was not able to understand it in total:
Well, the only small sub-case still is not solved is copying several selected filenames in 8.3 format without paths.
I've reread now you post above and was not able to understand it in total:
To avoid a new embarrassment I'd better ask just now, what I should do exactly in order to copy filename in 8.3 format by using "cd" command with parameter "%p"?You can use command "cd" and parameter "%p" to go to path with short names.
But it seems you can not use command "cd" and parameter "%P" to go to path with long names.
As I tried (but failed) to explain above, my solution does not work for several selected files.leopoldus wrote:Well, the only small sub-case still is not solved is copying several selected filenames in 8.3 format without paths.
This has to do with copying file name including path. I have included a link in my message above to a bug report where you can find more information about this.leopoldus wrote: I've reread now you post above and was not able to understand it in total:To avoid a new embarrassment I'd better ask just now, what I should do exactly in order to copy filename in 8.3 format by using "cd" command with parameter "%p"?You can use command "cd" and parameter "%p" to go to path with short names.
But it seems you can not use command "cd" and parameter "%P" to go to path with long names.
You can find more information about %P, %p, %l, %L in Total Commander's help. These variables must be used in the Parameters field. Creating a button with "cd" in the Command field and "%p" in the Parameters field will allow you to go to the current path in short naming notation.