GetFile and GetFolder

Forum help and suggestions to improve this forum.

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 2161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 469 times
Been thanked: 108 times
Contact:

GetFile and GetFolder

Post by serge_girard » Tue Nov 17, 2015 5:16 pm

Hello,

Can anybody tell me how to retrieve a filename + foldername? (Eg C:\test\file.dbf)

I want to retrieve a file plus its location. GetFile() gives only filename but without drive + folders + subfolders.

Thanks, Serge

User avatar
pctoledo
Posts: 121
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Has thanked: 3 times
Been thanked: 5 times
Contact:

Post by pctoledo » Tue Nov 17, 2015 6:14 pm

See this samples: C:\hmg.3.4.2\SAMPLES\Functions\GETFILE

Compile and select: File / Test 2
Regards/Saludos,

Toledo

Clipper On Line

User avatar
pctoledo
Posts: 121
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Has thanked: 3 times
Been thanked: 5 times
Contact:

Post by pctoledo » Tue Nov 17, 2015 6:25 pm

Syntax:

GetFile ( acFilter ,
cTitle ,
cDefaultPath ,
lMultiSelect ,
lNoChangeDir ,
nFilterIndex ) --> SelectedFileName(s)

Tips:

- If <lMultiSelect> option is used, a character array containing selected filenames is returned (maximun number of selected files returned is 1024).
- If <lNoChangeDir> option is omitted, default value is .F. If .T. retrieve drive + folders + subfolders.
- If passed <nFilterIndex> by reference, will return index of file filter selected by user
Regards/Saludos,

Toledo

Clipper On Line

User avatar
serge_girard
Posts: 2161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 469 times
Been thanked: 108 times
Contact:

Post by serge_girard » Tue Nov 17, 2015 6:30 pm

Thank you Toledo!
I will try,

Serge

User avatar
serge_girard
Posts: 2161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 469 times
Been thanked: 108 times
Contact:

Post by serge_girard » Tue Nov 17, 2015 6:36 pm

Great it works !
Thanks again, Serge

Post Reply