In my application I need to save a file(image,pdf,txt) to a folder.
I need to add as many images or files to my folder.
Suppose I have an image with name “image1”, if this already exists
in the folder and if another user trying to add another image with the name
“image1” then my application automatically needs to change imagename to “image2”.
So the application should check whether the file exist, if so save the
new image with a different name.
Any help will be appreciated.
In my application I need to save a file(image,pdf,txt) to a folder. I need
Share
You can do like…
However it would be better if you save the file with appending Current DataTime with the filename. e.g.