Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. OpenFileDialog dlg = new OpenFileDialog();

OpenFileDialog dlg = new OpenFileDialog();

Scheduled Pinned Locked Moved C#
tutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eyungwah
    wrote on last edited by
    #1

    Hello all: I have this code below to display whatever the Browse is selected. For example, if user select C:\cmd.exe. I would like to add the "*" after backward slash. So it would be C:\cmd.exe\*. OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { tb_batchparams.Text = dlg.FileName; } System.Diagnostics.Process proc1; System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo(); procInfo.WorkingDirectory = "C:\\dcm\\bin"; procInfo.FileName = "scu.exe"; procInfo.Arguments = tb_batchparams.Text // how do I include "\*" so it would be C:\dcm\bin\scu.exe\* instead. proc1 = System.Diagnostics.Process.Start(procInfo); Thanks, eyungwah

    Mircea PuiuM 1 Reply Last reply
    0
    • E Eyungwah

      Hello all: I have this code below to display whatever the Browse is selected. For example, if user select C:\cmd.exe. I would like to add the "*" after backward slash. So it would be C:\cmd.exe\*. OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { tb_batchparams.Text = dlg.FileName; } System.Diagnostics.Process proc1; System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo(); procInfo.WorkingDirectory = "C:\\dcm\\bin"; procInfo.FileName = "scu.exe"; procInfo.Arguments = tb_batchparams.Text // how do I include "\*" so it would be C:\dcm\bin\scu.exe\* instead. proc1 = System.Diagnostics.Process.Start(procInfo); Thanks, eyungwah

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      use @"\*" or "\\*"

      SkyWalker

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups