News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

lfn to 8.3 names

Started by Magnum, August 23, 2013, 05:10:30 AM

Previous topic - Next topic

Magnum

> One of my compilers is 16 bit, so I am stuck with 8 character names for a 16 bit compiler.
>
> Is there a way to convert a long file name to the 8.3 format ?
>
> I tried using dir /x, but it does not show short file names.
>
> Andy
>

The %%~s and %~s at the cmd prompt work most of the time.  There is a bug that makes it fail however.

for %a in (*.*) do @echo %~sa

The above is not reliable.

Assembly, batch, or script ideas are welcome.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org


nidud

#2
deleted

FORTRANS

Hi,

   From a command line "DIR /X" gives you the 8.3 file name that
windows generates.  See "DIR /?" for a better explanation.

21-04-13  11:56a        <DIR>          MYDOCU~1        My Documents

   It works for me.  It should work for you.

Cheers,

Steve N.

Magnum

dir /X

Directory of C:\MASM32\SOURCE

08/22/2013  03:52 PM    <DIR>                       .
08/22/2013  03:52 PM    <DIR>                       ..
08/21/2013  06:59 AM               142              .directory
08/21/2013  06:27 AM           975,858              AdwCleaner.exe
08/04/2013  09:50 PM               767              backup2Toshiba.bat
08/22/2013  06:50 AM             2,297              BAK.BAT
08/22/2013  06:50 AM            11,508              bats.zip
08/22/2013  06:50 AM               252              blank.asm
08/19/2013  05:00 PM             2,560              blank.exe
08/19/2013  12:26 AM            15,947 BOOKMA~1.ZIP bookmarks.zip
07/23/2013  04:41 PM           650,240              ClearPastItems_Keep.msi
07/29/2013  04:04 PM               194              Clear_Tmp.bat
08/21/2013  08:26 PM         2,359,350              ConstantGuard.bmp
08/20/2013  09:57 AM             8,649              DialIn.asm
08/21/2013  12:25 PM    <DIR>                       Downloads
08/20/2013  10:35 AM            98,650              download_flash_and_video-1.37-fx+sm.xpi
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

FORTRANS

Hi,

   Cute.  I have not seen that.  What kind of file system do you
Have?

21-04-13  11:56a        <DIR>          DOWNLO~1        Downloads

   Does the attached directory program fail identically?  Or does
it show something different?

Regards,

Steve


Magnum



Microsoft Windows XP [Version 5.1.2600]

Looks like an 8.3 name in there.  :t

File display program.

File          Size    Date   Time
FIRELA~1.RTF  4187 18 Aug 13 23:52  ³ TDCONFIG.TDW   691 19 Aug 13 17:01

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

Quote from: nidud on August 23, 2013, 05:57:19 AM
you could use a list file

list -r -y -xd -s makeit.bat \masm32\*.asm "tasm %f\n"

makeit.bat:

tasm \masm32\datetime\demo\WORLDT~1.ASM
tasm \masm32\datetime\COPYDA~1.ASM
tasm \masm32\datetime\CURREN~1.ASM
tasm \masm32\datetime\CURREN~2.ASM
tasm \masm32\datetime\CURREN~3.ASM
tasm \masm32\datetime\DateAdd.asm
...


I am trying to figure out what you have.

I would like to name my tasm 16 bit code using LFNs.

Then assemble and link them.

So I would need to convert LFN .asm files to 8.3 names to assemble and link, then delete the 8.3 file names.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

nidud

#8
deleted

nidud

#9
deleted

nidud

#10
deleted

dedndave

in a batch, you can use %~s

for example, %1 refers to the first command line parameter
so, create a batch file, test.bat...
@echo off

set tempstr=%~s1
echo %tempstr%


then, if you type at the prompt...
C:\Documents and Settings\Dave\Desktop => test c:\0longpathaaaa\longfilename.txt
c:\0LONGP~1\LONGFI~1.TXT


%~fs is similar, used with batch FOR loops

FORTRANS

Quote from: Magnum on August 23, 2013, 08:06:38 AM

Looks like an 8.3 name in there.  :t

File display program.

File          Size    Date   Time

Hi,

   Yeah.  Sorry, I assume that ANSI.SYS is loaded.  Anyway, you
seem to have have access to the 8.3 names.

Steve



Adamanteus

Quote from: Magnum on August 23, 2013, 08:10:42 AM

I am trying to figure out what you have.

I would like to name my tasm 16 bit code using LFNs.

Then assemble and link them.

So I would need to convert LFN .asm files to 8.3 names to assemble and link, then delete the 8.3 file names.

Andy

The filenames with tilda's not works with prog tools under DOS - so, I'm renaming files from long to short filenames and back, using /r option of clef, and copying new versions to both sides when makes it.

Magnum

Thanks.

I used Google translate but I can not find out how to download it.

The font is yellow on white.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org