Solved

VB - Download temp file, edit temp file, upload edited temp file - read file

Posted on 2013-01-15
2
453 Views
Last Modified: 2013-01-15
I have a small VB program that downloads a file from an FTP, then it edits it, then it uploads it back - and then it reads the new file in and does some stuff.

What I'm trying to figure out is where to "Save" the file when downloading it from the FTP.

Every PC likes to save files in different places - where is a safe place to save it every time?  Or should I just make the user choose the directory?

I was trying to do the "C:\" dir but on Windows 7 it says "Access denied"

Ideally I'd like to just read in the file from the FTP...and then write over the old one and save it over the file in the FTP - but I'm not sure how to make that all happen on the FTP with streamreader/streamwriter

All edits are done automatically by the program after it reads in the file - so once the user chooses the file on the FTP to "edit" it I would like it all done in the background without any saving as/etc junk for the user to have to bother with.

I have a feeling I'm over thinking this - any advice on how to do this quicker/faster/smarter let me know
0
Comment
Question by:ProdigyOne2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 38779964
You can save in current directory, in documents folder, in temp files folder etc

http://dotnetref.blogspot.co.uk/2008/03/find-temp-directory-and-getting.html
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 38780390
%temp% is the preferred location, perhaps after your upload is successful you could delete the file.
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month5 days, 19 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question