Re: extra \ charecter in file path

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<prakashdehury@xxxxxxxxx> schrieb im Newsbeitrag
news:1179143237.875689.50900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In my c# application
when i use this FileStream fs = File.Open("C:\\Temp\\497_01\\\
\Assumption.txt",FileMode.Open);

First one hint. For file path it's better to use verbatim strings:
.... @"C:\Temp\497_01\\Asumption.txt" ...
this is much easier to read.

1. it works fine, when i ran the exe locally. (e.i : c:\> c\temp
\Test.exe)

This puzzles me. I couldn't even construct such path.
What Filesystem you are using.

2. When i execute the exe from share path it throw an exception saying
file does not exists
(e.i :C:\> \\TTTYUOT\temp\Test.exe)

The extra slash seems to have an effect like a relative path.
Where is the file actually located ?


.



Relevant Pages

  • Re: congrats!
    ... Was there any hint with RedTop? ... schrieb im Newsbeitrag ...
    (rec.games.backgammon)
  • Re: congrats!
    ... schrieb im Newsbeitrag ... Was there any hint with RedTop? ...
    (rec.games.backgammon)
  • Re: congrats!
    ... i also have played some bot cheaters before and there was no hint, ... play, nothing special ... schrieb im Newsbeitrag ...
    (rec.games.backgammon)
  • Re: cease and desist
    ... "rainbowguardian" schrieb im Newsbeitrag ... Hey does anyone know where I could find a coca ...
    (alt.gathering.rainbow)
  • Re: The Light that Protected A-Nejad in UN (picture)
    ... "peace2005" schrieb im Newsbeitrag ... citizenship and his daughter's BRITISH citizenship". ... that you bring Baseless story. ...
    (soc.culture.iranian)