We help IT Professionals succeed at work.

The device is not ready

dba123
dba123 asked
on
Medium Priority
2,241 Views
Last Modified: 2007-12-19
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
Comment
Watch Question

Commented:
Is this F drive  a mapped network drive?

Po$$e

Author

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

Author

Commented:
Ok, back to UNC.  I had only switched it to F:\ because I was having some problems with my writes

Commented:
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

Author

Commented:
well, I gave it Administrators, Domain Admins, everyone full access.
Commented:
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$\"  ?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
LoL that should be enough access for one person ^^

Author

Commented:
crap, i didn't mean to PAQ....

Author

Commented:
oh, yes I did!

hahaha

Author

Commented:
I'm losing my mind...

Commented:
dba123, is this solved or do you need me to check it out further.???
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.