stevebooth has asked for the wisdom of the Perl Monks concerning the following question:
Running on a Windoze machine. I'm running into a problem with the following:
The process cannot access the file because it is being used by another process
If I'm in a loop, I can delete/unlink all but the last one.
The code is pretty basic:
# Both names are fully qualified... $cmd_shell = "Move $script_name $processed_script_name"; $return_code = `$cmd_shell`; if ( !(-e $processed_script_name) ) { $msg_text = "Error: Move (Processed:Script) command did not work:\n +" . " $cmd_shell\n" . " Return Code:\n" . " $return_code\n"; print $msg_text; }
The Move Statement (both paths exist):
Move F:\Alstom\habdata90\almarc\Processing\Appleton\Script_Files\av_20 +041216_142000_20041216_142500_ems.pl F:\Alstom\habdata90\almarc\Proce +ssed\Appleton\Script_Files\av_20041216_142000_20041216_142500_ems.pl
Any and all help would be appreciated by this Perl newbie...
2004-12-16 Janitored by Arunbear - added code tags around move statement, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Process cannot Access file
by demerphq (Chancellor) on Dec 16, 2004 at 22:43 UTC | |
|
Re: Process cannot Access file
by Stevie-O (Friar) on Dec 16, 2004 at 21:58 UTC |