I'm looping through a set of files in a directory and timporting the records from those files into a table. I want to be able to move the files to a backup directory after I timport the records, but I get this error:
Cannot mv output.txt to \backup\output.txt: The process cannot access the file because it is being used by another process.
Here's my code:
<stat NAME="*.txt" ROW MAXDEPTH=1 ALL $importdir>
<$importfile=$ret>
<timport row $schema1 FROMFILE $importfile>
<!-- insert into table -->
</timport>
<sysutil mv $importfile $backupdir>
</stat>
Cannot mv output.txt to \backup\output.txt: The process cannot access the file because it is being used by another process.
Here's my code:
<stat NAME="*.txt" ROW MAXDEPTH=1 ALL $importdir>
<$importfile=$ret>
<timport row $schema1 FROMFILE $importfile>
<!-- insert into table -->
</timport>
<sysutil mv $importfile $backupdir>
</stat>