Click to See Complete Forum and Search --> : Copying/Renaming Files Uploaded Using a Form and Script


EssiX
June 29th, 2001, 09:35 AM
Hi,
I've made a Software Estimate Tracking program where a user inputs a description, title, etc. of an estimate and then uploads a file onto a server. I've been using an Access 97 database, a Web page Form, and a VB script to proccess the data. I'm coding the script in VB 6.0. Now I have it where the user uploads a file to be store in a string variable "UploadedFile."
Here was my following test code:

UploadedFile = "temp.txt"
FileCopy UploadedFile, "SWEFiles/test.txt"

The directory I set it to was at the beginning of my program:

ChDir ("\app-sw\SWestimates\")

So I'm basically copying files in that Network Neighborhood directory. Now as you can see by the code, I have it working If I set pre-defined paths for the source and destination of the FileCopy method. But, I wanted it so that the Source is equal to whatever the user picks as the file. And I wanted that file copied, renamed, and then stored on the server. If I can't do this with FileCopy, is there some other way of coding it?
Thanks for reading my post... =)
-Sameer

Cimperiali
July 2nd, 2001, 09:02 AM
Have a look at FileSystemObject...


Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.

EssiX
July 2nd, 2001, 09:23 AM
Hi,
Is there any link I could go to for some good info on FileSystemObject with copying/renaming? Whenever I try help in VB 6.0, I get "please reinstall MSDN collection" errors...