8.3 File names

  • Thread starter Thread starter cjk32
  • Start date Start date
C

cjk32

Hello,

When setting up actions for a given filetype, is there any way to force
windows to pass the filename on the command line in 8.3 format?

For example, instead of having:

oldprog.exe "%1"

You'd have:

oldprog.exe %8

Many thanks,

Chris Key
 
Hello,

When setting up actions for a given filetype, is there any way to force
windows to pass the filename on the command line in 8.3 format?

For example, instead of having:

oldprog.exe "%1"

You'd have:

oldprog.exe %8

Many thanks,

Chris Key

There probably is a way but you need to be more specific.
Presumably you're talking about a batch file, so let's have
an example of what you're trying to do. Why do you actually
want SFNs?
 
Hello,

When setting up actions for a given filetype, is there any way to force
windows to pass the filename on the command line in 8.3 format?

For example, instead of having:

oldprog.exe "%1"

You'd have:

oldprog.exe %8

Many thanks,

Chris Key

- - - - - - - - begin screen capture WinXP Pro SP2 - - - - - - - -
C:\cmd>dir data\l*.* | find "/"
03/28/2001 02:12 PM 923 linespeeds.txt
10/22/2001 09:11 AM 412 ListOfServices.dat

C:\cmd>for %a in (data\l*.*) do @echo %~snxa
LINESP~1.TXT
LISTOF~1.DAT

C:\cmd>for %a in (data\l*.*) do @echo %~sfa
C:\cmd\data\LINESP~1.TXT
C:\cmd\data\LISTOF~1.DAT

C:\cmd>for %a in (data\l*.*) do @echo %~sa
C:\cmd\data\LINESP~1.TXT
C:\cmd\data\LISTOF~1.DAT
- - - - - - - - end screen capture WinXP Pro SP2 - - - - - - - -

So on the basis of the preceding, you would use

oldprog.exe %~snx1

if you only want the filename or

oldprog.exe %~f1

if you want the file path as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top