Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Long filenames in Windows NT

by Anonymous Monk
on Aug 20, 2002 at 10:35 UTC ( [id://191429]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Anyway to translate DOS files that have long filenames? My current names look like this on my NT:

Longna~1.ppt
Longnb~1.ppt
Nextfi~1.ppt
Nextfi~2.ppt
Filena~1.ppt

I want to get a list of all the filenames with their fullnames output to a text file.

Replies are listed 'Best First'.
Re: Long filenames in Windows NT
by PodMaster (Abbot) on Aug 20, 2002 at 11:22 UTC
Re: Long filenames in Windows NT
by theorbtwo (Prior) on Aug 20, 2002 at 10:57 UTC

    IIRC, NT doesn't have the concept of "long" and "short" names. Check on this with windows explorer -- right-click a file, and see if it gives you a long and short name.

    If it doesn't, what you're asking for is simply impossible. If it does, look at Win32::API, and search on Microsoft Developer Network for the proper API function to call. IIRC, there's a fairly simple API for this.


    Confession: It does an Immortal Body good.

Re: Long filenames in Windows NT
by JaWi (Hermit) on Aug 20, 2002 at 11:00 UTC
    You should check out the Win32API::File CPAN module. It allows you low-level access to the Win32 API related to file and directory handling.

    Succes!

    -- JaWi

    "A chicken is an egg's way of producing more eggs."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://191429]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-23 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found