Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2174
  • Last Modified:

The device is not ready

For the life of me I cannot figure out why all of a sudden I'm getting this error when it tries to move my files using the MoveInputFiles() Sub.  The only think I know that happened different lately is on my server( which this code is running from), I had rebooted and when I tried to run this again, for this line:

System.IO.File.Move(srcFolder1 & file1, destFolder1 & file1)

I get these errors:

System Error Information: The device is not ready. Place: 6 System.IO.IOException: The device is not ready. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.__Error.WinIOError() at System.IO.File.Move(String sourceFileName, String destFileName) at HEDI2.Module1.MoveInputFiles() in Y:\inetpub\wwwroot\sss\ssis\maintenance\sss\phase2_consoleapp\sss\sss\Module1.vb:line 172

Then in my MsgBox I get this error as though it's treating my F drive as a CDRom or something: www.webfound.net/nodisk.jpg

Here's the entire code, then I took out this part which I had added to try to close any processes that m ay have been locking my incoming .mnt and .naf files which was causing the problem:
            'If Not filefs Is Nothing Then filefs.Close()
            'If Not reader Is Nothing Then reader.Close()


www.webfound.net/allcode.txt
0
dba123
Asked:
dba123
  • 6
  • 5
1 Solution
 
possekeCommented:
Is this F drive  a mapped network drive?

Po$$e
0
 
dba123Author Commented:
it's a drive on my server, not a network drive but I am able to map to it fine....the .NET code reside on my server, but I'm Debugging it from my local PC here at work and running it in VS 2005
0
 
dba123Author Commented:
Ok, back to UNC.  I had only switched it to F:\ because I was having some problems with my writes
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
possekeCommented:
Very strange indeed,

I'm also seeking in the dark, the code seems perfect, ain't nothing I can say about that...

Could it have something to do with permissions?

Po$$e
0
 
dba123Author Commented:
well, I gave it Administrators, Domain Admins, everyone full access.
0
 
possekeCommented:
Maybe another remark, I'm just trying to help so excuse me if it looks stupid:

        Dim srcFolder1 As String = "\\sss\f$\inetpub\wwwroot\sss\ssis\maintenance\sss\phase2\mnt_input"
        Dim destFolder1 As String = F:\inetpub\wwwroot\sss\ssis\maintenance\sss\phase2\mnt_input_old"

So if you use UNC the F:\ corresponds with "\\sss\f$\"  ?
0
 
possekeCommented:
LoL that should be enough access for one person ^^
0
 
dba123Author Commented:
crap, i didn't mean to PAQ....
0
 
dba123Author Commented:
oh, yes I did!

hahaha
0
 
dba123Author Commented:
I'm losing my mind...
0
 
possekeCommented:
dba123, is this solved or do you need me to check it out further.???
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now