473,382 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

File Path question

Hello!

I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?

TIA!

Rudy
Nov 19 '05 #1
3 1205
"Rudy" <Ru**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?


I'm not sure I fully understand what you're asking... Presumably, you're
talking about the HtmlInputFile control here... You're correct that the
PostedFile.FileName property gives you the fully qualified filespec of where
you're uploading the file from (relative to the client's PC, obviously) and,
to save it on the server, you would use the PostedFile.SaveAs method,
specifying a filespec on the server to save the file into...
Nov 19 '05 #2
Rudy,

You know you can write
sFileName = "c:\\newpictureplace";
or
sFileName = {whatever server-side code that returns file path};
don't you?

Eliyahu

"Rudy" <Ru**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
Hello!

I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?

TIA!

Rudy

Nov 19 '05 #3
Thank you for your help Mark and Eliyahu. You pointed me in the right
direction!

"Eliyahu Goldin" wrote:
Rudy,

You know you can write
sFileName = "c:\\newpictureplace";
or
sFileName = {whatever server-side code that returns file path};
don't you?

Eliyahu

"Rudy" <Ru**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
Hello!

I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?

TIA!

Rudy


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Sean Ross | last post by:
Hi. Recently I made a small script to do some file transferring (among other things). I wanted to monitor the progress of the file transfer, so I needed to know the size of the files I was...
11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
2
by: Teis Draiby | last post by:
(Using C#) Question 1: Is there an easy build-in support for determining wether a given file path is 1) A valid file path (Only legal characters) 2) The file exists 3) The path exists
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
17
by: Joe Laughlin | last post by:
I've not used C much before, so I don't know how robust or good this code is. I'd appreciate any feedback or criticisms anyone has! Thanks, Joe #include <stdio.h> #include <string.h>
2
by: Chris Fink | last post by:
I am using the System.IO.File class to determine if a file exists on a network share. The File.Exists method keeps returning false, even though the file does exist. The MSDN documentation...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
65
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.