I'm a little new to coding and I am especially new to c# and visual studios. I am working on a project that I am hoping to be able to implement. Currently, I am using FileHelpers to read in a csv file and parse through and write the columns and values to the console. However, I need it to do something more complex. Each night a new csv file will be in a folder on my computer which I am doing through FTP. For my code right now, I am calling the file that I want to read in manually using: engine.ReadFile(@"c:\Users\guest\Documents\CSV\test.csv")
This was fine to begin with, but now my goal is to read in every file in that folder and send to a SQL Server. (It will still only be one file because my goal is to move the file to a different folder after it is read). How would I be able to read through and use all of the files. Would I just simply stop the directory at the folder? (i.e. @"c:\Users\guest\Documents\CSV). Also, it's not just one folder, I want to be able to read the files in one at a time from three different folders. Finally, is there anyway to implement the moving of the file after being read to a different folder specifically for files that have already been read. Thank you