title: Issue with an LPR Command in VB
body: <p>I am creating a VB app which will "move" xls reports from a directory to a ReportSafe app. I am also working in an existing VB app which does just that, so I am using it for reference.</p>
  
  <p>It isn't as simple as moving files from one directory to another, because ReportSafe requires an lpr command to tell it (ReportSafe) which file to pick up. </p>
  
  <p>Here is what I have so far: </p>
  
  <pre><code>Imports System.IO
  Module Module1
  
  Sub Main()
  
      ''Declarations
      Dim Files As ArrayList = New ArrayList()
      Dim FileName As String
  
      ''Write All Files in *directory* to ReportSafe
      Files.Clear()
      Files.AddRange(Directory.GetFiles(*directory*))
      For Each FileName In Files
  
          Dim RPname As String
          Dim RealName As String
          RPname = FileName.ToString
          RealName = "/"
          RealName = RealName &amp; RPname.Remove(0, 34)
  
          Dim a As New Process
          a.StartInfo.FileName = "C:\Windows\system32\lpr.exe"
          a.StartInfo.Arguments = "-S*ServerName* -Plp -J" &amp; Chr(34) &amp; RealName &amp; Chr(34) &amp; " " &amp; Chr(34) &amp; RPname &amp; Chr(34)
          a.StartInfo.UseShellExecute = False
  
      Next
  End Sub
  
  End Module
  </code></pre>
  
  <p>The whole lpr command/arguments are throwing me for a loop. I'm not sure if my question is specific to ReportSafe, and if that's the case, I may be out of luck here. I have pulled this code from the already existing app which moves reports to ReportSafe, and adjusted for my own use, but no luck so far. </p>
  
  <p>FYI, I had to turn on LPR Monitor services to obtain to the lpr.exe</p>
  
  <p>Questions: 
  What are the proper arguments to pass through to this lpr command?
  Is there a problem with the logic that is causing the issue? </p>