I have a backup files in folder path is like this C:\Folder
the files are like this in below image
the file name like this…20111011 means today date
095523 means time
and i have a date time picker and i have button when the user select the value in datetime picker and select the button ,
I need to compare the date time picker value with the file name stored in that folder , and then if date time picker value matches the part of the folder name (backup-{this is part}) i want to extract zip file into the given folder ….
how can i get compare date time picker value with the folder name and extract the files in to given path ….
In .net Directory.GetFiles method used to get files from specific path.
Below code mentioned in link make changes in foreach loop as you need. This loop give you filename and you can compare it.
Check this link for datetimepicker value