Windows/DOS - Short Filenames - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Windows/DOS - Short Filenames

I am not sure I am posting this in the right place. I will be posting it in the DOS area as well.

I am working with an application that is running on Windows NT, but it wants to use short 8.3 file names. I need to able to convert a long filename to a short file name myself, to match a potentially existing file on a another server. I read about the basic 8.3 algorithm on the MSDN network, but that doesn't seem to apply here, because there is a twist.

The other server is an AIX server that the NT box is accessing via Samba. So instead of the standard ~ and sequential counter to determine the short file name, I am getting names that are a bit different. For example :


Long File Short File
1673-2LCS.opc 1673-~RD.opc
200229-1MS.opc 20022~4J.opc
200229-1MSD.opc 20022~J5.opc

My application has the long file name, but I don't have the short file name. This particular application has its own macro language through which I have written the code to copy the file from the AIX server to a WIN2K server. I would like to duplicate the short file name algorithim in the macro if possible.

Has anyone ever encountered a similar situation and have they determined the naming algorithim?

I may consider writing a VB application that can be launched from the macro. The application whould be able to get the short file name or use the long name.

If I am not posting to the right board please let me know and direct me accordingly.

Thanks for the help.

Comments

Sign In or Register to comment.