Re: Difficulty in playing MP3 files

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Dipesh" <dipesh.agrawal@xxxxxxxxx> wrote:
Process.Start("wmplayer.exe", @"\My Documents\My
Music\applause.mp3";

Try changing this line to

Process.Start("wmplayer.exe", @"""\My Documents\My Music\applause.mp3""");

This will surround the filename with double quotes (the "" gets turned
into a single " in a verbatim string) and should help Media Player
find the file.

--
Scott Seligman [MSFT]
This posting is provided AS IS with no warranties, and confers
no rights.
.



Relevant Pages

  • Re: File.Exists(filePath) always returns false in release mode if filePath contains a white space
    ... Either use the short path name or surround the filename with quotes as the ... Newbie Coder ...
    (microsoft.public.dotnet.languages.vb)
  • [PATCH] update checkpatch.pl to version 0.13
    ... This version brings a large number of fixes which have built up over ... prevent unclosed single quotes from spreading ... function brace checks should use any whitespece matches ... for my $filename { ...
    (Linux-Kernel)
  • Re: Duplicate entries
    ... To understand a little bit about a DCount statement, ... Surround the field or fields with quotes as I did. ... Surround with quotes and end with a comma. ...
    (microsoft.public.access.formscoding)
  • Re: text file saved in COM format..
    ... caused it to run rather than opening in notepad. ... Try saving any file in notepad, it never suggests a filename ... i'm sure you mean double quotes. ... won't append any extension to the end of it. ...
    (microsoft.public.windowsxp.general)
  • Re: MacTeX and spaces in filenames
    ... if I have a filename with a space in it, ... (assuming "abc def.tex" is the TeX file name, without quotes). ... defines the expansion of \jobname with double quotes around it, ...
    (comp.text.tex)