myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Error: The requested operation cannot be performed on a file with a user-mapped section open.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> Batch >> Error: The requested operation cannot be performed on a file with a user-mapped section open. Page: [1]
Login
Message << Older Topic   Newer Topic >>
Error: The requested operation cannot be performed on a... - 11/20/2008 3:19:31 PM   
ndaniels


Posts: 191
Score: 32
Joined: 2/24/2006
From: The Republic of Elbonia
Status: offline
I've come up with a fairly complex batch file that I'm using to parse log files and it's randomly encountering an error message I've never seen before.  The batch file only encounters this error on rare occasions and most of the time works just fine.  The "~JFL6.tmp" is a text file which is generated by another process of the same batch file and was only 384 bytes in size at the time of the crash.  When I encounter the error, the batch file bombs out and stops at this line...

Actual Line of Code:
type %temp%\~JFL6.tmp|find /v /n ""|find "[">%temp%\~JFL7.tmp

Error Message at Execution:
C:\Temp>type C:\DOCUME~1\User\LOCALS~1\Temp\~JFL6.tmp  | find /v /n ""  | find "[" 1>C:\DOCUME~1\User\LOCALS~1\Temp\~JFL7.tmp
The requested operation cannot be performed on a file with a user-mapped section open.

This piece of code is part of a subroutine call from a "for /f" statement.  The batch file is being run locally from a C:\Temp folder and the data it is processing is stored in the same folder.  If anyone could provide information about what this error message means, I'd greatly appreciate it.  Thanks!
Post #: 1
RE: Error: The requested operation cannot be performed ... - 11/21/2008 1:16:41 AM  1 votes
SMSExpert

 

Posts: 193
Score: 39
Joined: 10/28/2008
Status: offline
Hi,
 
It means that the particular .tmp file is in use with another process.
 
 

(in reply to ndaniels)
Post #: 2
RE: Error: The requested operation cannot be performed ... - 11/21/2008 10:51:40 AM   
ndaniels


Posts: 191
Score: 32
Joined: 2/24/2006
From: The Republic of Elbonia
Status: offline
Interesting.  I wonder if the operating system is not finished closing out the "~JFL6.tmp" before the "TYPE" starts to access it.  I added a line of code between where file 6 is created and where it's accessed, with the hopes of stalling the process long enough to allow file 6 to close.  I also changed the problem line to...

find /v /n "" %temp%\~JFL6.tmp|find "[">%temp%\~JFL7.tmp

Since making these changes, the problem appears to have stopped occurring.  Because the problem was random, it's hard to know for sure if I have the problem licked.  Thanks for feedback!

(in reply to SMSExpert)
Post #: 3
Page:   [1]
All Forums >> [Scripting Technologies] >> Batch >> Error: The requested operation cannot be performed on a file with a user-mapped section open. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.203