File name list?

Post your questions and help other users.

Moderator: Martin

Post Reply
anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

File name list?

Post by anuraag » 30 Dec 2016 11:26

I want to get only file names inside a folder. Currently when i am using Init Variable File List its showing me with path of files.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: File name list?

Post by Martin » 30 Dec 2016 20:48

You could use following script to convert the file names:

Code: Select all

for (i in [0 to length(files)-1])
{
  name_start = lastIndexOf(files[i], "/") + 1;
  files[i]=substring(files[i], name_start);
}
Regards,
Martin

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: File name list?

Post by anuraag » 31 Dec 2016 00:01

Thanks Martin.

Post Reply