in reply to Access is denied

I merely understand what you wrote, but I think what you've done is a total mess

why would you need to use 2 scripts in the first place?

What does the 'exe' program do

what you're trying to accomplish by reading 12,000 files ??

You are getting access denied error because you are trying to write data while the file is locked by another process as the error message explains

if you can explain your problem using a well formatted node/replay ... We'll be able to assist you better.

Replies are listed 'Best First'.
Re^2: Access is denied
by Anonymous Monk on Jan 07, 2010 at 08:58 UTC
    I have to run my compiler on around 12000 files which are unit testcases. For this, i have a perl script "a.pl" which internally call another perl script "b.pl". "b.pl" invokes compiler_exe on the specified file. "a.pl" reads a file named files.txt containing list of file names on which the exe is to be invoked. Filenames are read from the files.txt one by one and its name is passed to "b.pl". "b.pl" invokes an exe on the file. The files.txt contain around 12000 file names. I need to two scripts because b.pl is like a wrapper for my compiler_exe which does some other things like setting options for the compiler to run with. However the problem is that, i get errors like "Access is denied" or "process cannot access the file as its being used by another process" on only FEW files(around 50 files).These 50 files are not the same always. The 12000 files are c files and they are not accessed by any other program or process. Perl : Active perl 5.8.8 for windows. On linux: There is no issue, everything works properly.