DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   file path name (http://www.daniweb.com/forums/thread166880.html)

ayi_102 Jan 7th, 2009 6:24 pm
file path name
 
this is asp using c#

string filename = "tracking result.csv";
        string sExportFile = Server.MapPath(filename);

it just the piece of the code

the code save the file to the server

Q = How can i save the file to the C drive? eg like c:\\testfolder\tracking result.csv

LizR Jan 7th, 2009 6:34 pm
Re: file path name
 
by copying it?

ayi_102 Jan 7th, 2009 6:39 pm
Re: file path name
 
yeah,

it can be by copying from the one that i have on the server?

coz my one is saved in the vs project sollution

and try to make another copy to the user in another specified folder

so they dont have to open the project folder

ddanbe Jan 7th, 2009 6:48 pm
Re: file path name
 
Create a file with your path on the C-drive. Write to it. Close the file. Done. Look at the File class for details.

Ramy Mahrous Jan 7th, 2009 6:55 pm
Re: file path name
 
But test of you've write access on the "C:\", check it.. I recommend such question to be in ASP.NET forum!! what do you see?

ayi_102 Jan 7th, 2009 7:15 pm
Re: file path name
 
Nah

i let it be like that

thx for the help


All times are GMT -4. The time now is 4:11 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC