Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Short file names

Jul
304
0
I know I should know this, but, well...

If I have a path to a file or folder

C:\Users\CWBillow\Documents\~ System\~ miTaggedMarks\Backup\miTaggedMarks.ini

How can I convert that to the 8.3 format-- not change it, just view what it would be?

Regards,
Chuck Billow
 
Look up @sfn and @altname in the online help. One of those should do what you want.

Also, when you look them up you should see a help item called Functions by Category. Click that, and one of the categories on the page is File names. Underneath there are a number of links to filename-related variable function topics.
 
Now I AM feeling stupid. I tried using @sfn from the command-line and keep getting errors. For instance, I typed at the command-line

@sfn "C:\Users\CWBillow\Documents\~ System\~ miTaggedMarks\Backup\miTaggedMarks.ini"

Didn't work. OK, it's all wromng...why?

Chuck
 
The [square brackets] are missing. Variable functions need those brackets. The online help provides all of the usage details.
 
Now I AM feeling stupid. I tried using @sfn from the command-line and keep getting errors. For instance, I typed at the command-line

@sfn "C:\Users\CWBillow\Documents\~ System\~ miTaggedMarks\Backup\miTaggedMarks.ini"

Didn't work. OK, it's all wromng...why?

It's a function, not a command. You would use it as the argument to any command -- ECHO, for example:
Code:
echo %@sfn["C:\Users\CWBillow\Documents\~ System\~ miTaggedMarks\Backup\miTaggedMarks.ini"]

If you find yourself doing this often, you can create your own command with an alias:
Code:
alias sfn=`echo %@sfn[%1]`
 

Similar threads

Back
Top