FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour save an image url
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
save an image url
Posted: Mon Feb 10, 2020 06:05 PM

when I save an Image the url is

"C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"

I wish save as " ..\images\due_lettini_regista.png"

how I can resolve ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: save an image url
Posted: Mon Feb 10, 2020 06:20 PM

Silvio,
you have all the functions inside
c:\fwh\source\function\filename.prg.
Did you see that Antonio announced the availability of the mod harbour servers?

Best regards,
Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: save an image url
Posted: Mon Feb 10, 2020 09:23 PM

Otto,
Sorry,
For now i cannot use mod_harbour
I must terminate my app
I tried with mod_harbour with no success

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: save an image url
Posted: Tue Feb 11, 2020 08:25 AM
Otto ,
sorry I TRIED with these functions

//?cFileNoPath( cPathMask )
//?cFilePath( cPathMask )
//?cFileDisc( cPathMask )
//?cFileNoExt( cPathMask )
//?cFileSubDir( cPathMask )
//? cFileUNC( cPathMask )
//? cRelativePath( cPathMask )

with no success!!!!

none give me ..\images\name.png
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: save an image url
Posted: Tue Feb 11, 2020 08:34 AM
Resolved

Code (fw): Select all Collapse
Function test()
Local cPathMask:="C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"

? RelativePath( cPathMask ) + UrlImage(cPathMask)
return nil

Function UrlImage(curlImg)  
   Local aTmp
   local nLevel := 1
   local x
   local cCad   :=""
   aTmp := Hb_ATokens( curlImg, "\" )
   For x = Len( aTmp ) - nLevel + 1 To Len( aTmp )
       cCad += AllTrim( aTmp[ x ] )
       if x < Len( aTmp )
          cCad  += "\"
       endif
   Next x
  return cCad

 Function RelativePath( cFile )
   local cPath, cRelPath, cTemp
   cPath:= cFilePath(cFile)
   cTemp:= left(cPath,len(cPath)-1)
   cRelPath:=  "." + right(cPath, len(cPath) + 1 - rat("\",cTemp) )
return cRelPath
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion