I want to check for a specific file in Downloads directory and delete it if it exists?
Someone please tell me how to get the full path of “Downloads” directory? Because If I use the full path, it doesn’t work when others use the same code, they need to change the path again.
Thanks a lot for the solution @SaranyaKishore. Currently used the suggestion provided by @Bharat. But definitely your solution will be helpful in future
But I am getting one more problem in this. Suppose if store the path in a variable say "downloadDirPath. then using directory.GetFiles(downloadDirPath) doesn’t give the list of files. Instead it prints the System.string. Actually now I want to list out all the files and search the specific file out of those.