Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
My VB skills are rusty, so please excuse the lack of efficient code. I've attached the full script, and 3 sample files. My issue is running this code I will randomly get errors that should not be able to occur. For instance look at this following code section:
vTarget = fsoObj.GetFile("I:UsersJaridClientNameWithheldClientNameWithheld_ETLstaging emp_ci.csv")
If fsoObj.FileExists(vTarget) Then
vFile.Name = "temp_ci.csv"
The program will run through 5 or 9 or 22, etc. files. For the first 5 files (insert any other number here) the program runs without an issue. It will finally cycle through, but randomly it will give a "File Already Exists" error.
I have run this with multiple set ups (some it would delete at the end of the sub function...trying it at the beginning to account for the other error), but I would get similar errors (i.e. - "Permission Denied" during the delete step). Has anyone run into something like this before? Does anyone have any suggestions?
0 · ·