VB - Download temp file, edit temp file, upload edited temp file - read file
Posted on 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