Long File Name to Short File Name converter

Long File Name to Short File Name converter

Postby Silvio.Falconi » Wed Jan 30, 2019 8:22 pm

I allways used lfn2sfn function

but I read that it is no longer supported, so if we had to read in a database field a very long string of an image file, how could we load it?

Example:

".\ Folder1 \ folder2 \ folder3 \ Folder4 \ Folder5 \ images \ name_file_image_mine.jpg"

any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Long File Name to Short File Name converter

Postby Marc Venken » Wed Jan 30, 2019 8:36 pm

I have the path not in the database, only the name (can be up tot 256 C)

In a string

Code: Select all  Expand view  RUN

         cSource = "r:\pictures\"+alltrim(STRTRAN(nofoto->id, '.', ''))+".jpg"


For Xbrowse

Code: Select all  Expand view  RUN

      WITH OBJECT :file
       :bStrImage     := { || "r:\pictures\kleuronline\"+alltrim(str(oBrwOnline:SelectedCol():Value))+".jpg" }
       :oDataFont     := oFontS
       :nDataStrAlign := AL_CENTER + AL_BOTTOM
       :nDataBmpAlign := AL_CENTER
       :aImgRect      := { nil, nil, -10, nil }
      END


to show

Code: Select all  Expand view  RUN

   @ 280,270 XIMAGE oBmp3 SIZE 50, 50 OF oDlg SOURCE "r:\pictures\kleuronline\"+alltrim(str(oBrwOnline:ID:value))+".jpg"

   @ 280,330 XIMAGE oBmp1 SIZE 70, 70 OF oDlg SOURCE "
r:\pictures\origineel\"+alltrim(tempfoto->foto)



If I correct think what you mean
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1447
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests