I built, compiled, and ran the application error-free on my Win2k PC. When I load the application on a WinXP PC I error out 'File not Found'. I can not find any reason for the error. below is the code the form consist of a text box "text1" and two timers.

vb Code:
  1. Option Explicit
  2. Dim DelFiles(0 To 100) As String
  3. Dim FS As New FileSystemObject
  4. Dim FSfolder As Folder
  5. Dim File As File
  6.  
  7. Private Sub Form_Load()
  8. Dim strStartPath As String
  9.     strStartPath = "C:\invprnt"
  10.     Call ListFolder(strStartPath)
  11. End Sub
  12.  
  13. Private Sub ListFolder(sFolderPath As String)
  14.    
  15.     Dim i As Integer
  16.     Dim Cnt As Integer
  17.     Dim Cmd As String
  18.    
  19.     Cmd = "c:\dosprint\dosprinter /raw "
  20.     Cnt = 0
  21.     StrtTime.Enabled = False
  22.     Set FSfolder = FS.GetFolder(sFolderPath)
  23.    
  24.         Text1.Text = ""
  25.         For Each File In FSfolder.Files
  26.             DoEvents
  27.             Text1.Text = Text1.Text & File & vbCrLf
  28.             Shell (Cmd & File)
  29.             DelFiles(Cnt) = File
  30.             Cnt = Cnt + 1
  31.         Next File
  32.        
  33.     Timer.Enabled = True
  34. End Sub
  35.  
  36. Private Sub StrtTime_Timer()
  37. StrtTime.Enabled = False
  38. Call ListFolder("c:\invprnt")
  39. End Sub
  40.  
  41. Private Sub Timer_Timer()
  42.     Dim Flag As Boolean
  43.     Dim Cnt As Integer
  44.     Timer.Enabled = False
  45.    
  46.     Flag = True
  47.     Cnt = 0
  48.    
  49.     Do While Flag = True And Cnt < 101
  50.         If IsNull(DelFiles(Cnt)) = True Or DelFiles(Cnt) = "" Then
  51.             Flag = False
  52.         Else
  53.             Call FileCopy(DelFiles(Cnt), "c:\bkupinv\" & Right(DelFiles(Cnt), 11))
  54.             Cnt = Cnt + 1
  55.            
  56.         End If
  57.     Loop
  58.            
  59.     Flag = True
  60.     Cnt = 0
  61.    
  62.     Do While Flag = True And Cnt < 101
  63.         If IsNull(DelFiles(Cnt)) = True Or DelFiles(Cnt) = "" Then
  64.             Flag = False
  65.         Else
  66.             Call Kill(DelFiles(Cnt))
  67.             Cnt = Cnt + 1
  68.         End If
  69.     Loop
  70.     Cnt = Cnt - 1
  71.     Do While Cnt >= 0
  72.         DelFiles(Cnt) = ""
  73.         Cnt = Cnt - 1
  74.     Loop
  75.     StrtTime.Enabled = True
  76. End Sub

Thanks for any suggestions

-RT