I have a process in which i have to download certain files and rename them according to user. the problem appears when the same user has more than one file and should rename the other files as user (2), user (3) and so on.
I havent figured a proper solution up to this point, so any help would be greatle appreaciated.
You can use directory.Getfiles(“Mainfolder”,“Staticfilename*”).Count this will give you the number of files with that name just use the count to add the number to your next file