Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: list files in directory


This question is answered.


Permlink Replies: 3 - Last Post: Apr 15, 2018 3:22 AM Last Post By: Antonio Estevez
filter filter

Posts: 4
Registered: 2/23/07
list files in directory  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2018 5:42 AM
hi can some one help I'm new to programming :(
I need to list files in specific dir so I can after that upload them with TidFTP

Edited by: filter filter on Apr 13, 2018 5:44 AM
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: list files in directory [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2018 6:10 AM   in response to: filter filter in response to: filter filter
filter filter wrote:

hi can some one help I'm new to programming :(
I need to list files in specific dir so I can after that upload them
with TidFTP

You can get list of the files in a folder using the RTL. Take a look at:

http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.IOUtils.TDirectory.GetFiles
filter filter

Posts: 4
Registered: 2/23/07
Re: list files in directory  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 15, 2018 1:11 AM   in response to: filter filter in response to: filter filter
filter filter wrote:
hi can some one help I'm new to programming :(
I need to list files in specific dir so I can after that upload them with TidFTP

Edited by: filter filter on Apr 13, 2018 5:44 AM

TY for answer but now I have new problem that Tdirectory is returning full path with file name but I need only file name
how to remove path or get Tdir to return only filename
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: list files in directory  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 15, 2018 3:22 AM   in response to: filter filter in response to: filter filter
El 15/04/2018 a las 10:11, filter filter escribió:
filter filter wrote:
hi can some one help I'm new to programming :(
I need to list files in specific dir so I can after that upload them with TidFTP

Edited by: filter filter on Apr 13, 2018 5:44 AM

TY for answer but now I have new problem that Tdirectory is returning full path with file name but I need only file name
how to remove path or get Tdir to return only filename

The TPath class from the System.IOUtils unit has a function to extract the file name:
   FileName := TPath.GetFileName( FullPath );
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02