Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I am creating an application in C# Windows Forms and I am having the following issue:

I have a number of XML files in a folder and I want to convert all the XML files (having a certain name) say suppose any XML file starting with or containing "Sample***.XML).

Now, all the XML files starting with or containing "Sample" will be imported and it will individually convert each XML in separate PDFs.

I believe I have to use a SDK for the conversion, but how do I import all the XML files in the mentioned manner?

Please help.

Regards
Aman Chaurasia

What I have tried:

I can import an XML manually from a given path but I don't want that.
Posted
Updated 16-May-18 2:58am

Use DirectoryInfo.GetFiles to access files based on filename.

https://msdn.microsoft.com/en-us/library/4cyf24ss(v=vs.110).aspx
 
Share this answer
 
Comments
Primo Chalice 17-May-18 1:37am    
Got it. No how do I export each file to a different pdf? Each PDF will be starting with ""PDF***.pdf"
Directory.GetFiles("Your_Path", "Sample*")
 
Share this answer
 
Comments
Primo Chalice 17-May-18 1:37am    
Got it. No how do I export each file to a different pdf? Each PDF will be starting with "PDF***.pdf"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900