wrong filepath

Dharmesh

New member
Joined
Aug 23, 2021
Messages
1
Programming Experience
10+
I run .net c# exe from access add-ins and passing filepath too. I am passing "p:\abc.mdb". When in the c# exe. I use one function File.GetLastWriteLine it show error because it make path to "c:\ p:\abc.mdb". I try to replace c:\ and try to get directorypath, filepath. But c:\ is not replaced. Why it happen. Kindly reply
 
Show us the code where you to take the input "p:\abc.mbd" and eventually pass the input string to your call to File.GetLastWriteTime().

Show use where you try to replace the "c:\".

Personally, my first guess would be that you have forgotten that C# strings are immutable, and therefore forget to pickup the return value of string.Replace(). That's all speculation though until I actually see your code.
 
Back
Top Bottom