CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Posts
    9

    Copying/Renaming Files Uploaded Using a Form and Script

    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




  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Copying/Renaming Files Uploaded Using a Form and Script

    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.
    ...at present time, using mainly Net 4.0, Vs 2010



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

  3. #3
    Join Date
    Jun 2001
    Posts
    9

    Re: Copying/Renaming Files Uploaded Using a Form and Script

    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...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured