Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying text between files and the last file getting permission denied

Status
Not open for further replies.

jlaica

Programmer
Jun 6, 2002
2
US
I am copying text from files within a temp folder to files within another folder. It works perfectly up until the last file in the set. It then will give me a permission denied error. Only for the last file in the set I can rename it so it will be done earlier and it will go fine and the new last one will fail.
 
I have determined the problem I have multiple scripts running one after the other and the script prior to the data transfer creates a variable "a" that is set to the path of the last object and when you set a variable in vbscript it is active until the buffer is cleared. So the object could not be used because this variable thought that the prior script was still using the file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top