Hi I have a folder with several pdf files. Wonder how i can loop trough all the pdf files and get the title from each file and assign that title to a excel sheet
You can use Directory.GetFiles(pathOfThatFolder)------------It will give you all files in that folder
ex Directory.GetFiles(“C:/PDF”)
Iterate them in a loop using For Each
then u can use scrapping of pdf and pick title and the using write cell u can write them in a excel
2 Likes
hi thanks, made it work actually was not that hard. but wonder if it possible to cut out the string ? the name it get now its something.pdf but can i remove the .pdf ?
in Assign - filename place
path.GetFileNameWithoutExtension(file.ToString)
This will give you only filename
mark as solution if this helps you
Thanks
2 Likes
perfect! thanks m8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.