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
LVL 1
dba123Asked:
Who is Participating?
 
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:
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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
dba123Author Commented:
Ok, back to UNC.  I had only switched it to F:\ because I was having some problems with my writes
0
 
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:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.