I have a batch script which copies logs from the client machine and backs it up on a server. There is a possibility that logs could have the same name, so we include an “if exist” command. A decade later, I have 60K logs in a folder. I have noticed that the if-exist command can take about 10 seconds, instead of milliseconds. It appears that this is happening because of the large number of files in the folder. I have tested this on a smaller folder and it is super quick. Am I barking up the right tree? Are there workarounds? Thoughts?
Thanks!
6