Get the current source file path in the Ring programming language

Hello

We can use the next function to get the current source file path
then we can add the path variable to the file name

cPath = CurrentPath()

func currentpath

cFileName = filename()

for x = len(cFileName) to 1 step -1

if cFileName[x] = “/”

return left(cFileName,x-1)

ok

next

return cFileName

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s