Solved

Rename and move a file

Posted on 2007-04-11
3
162 Views
Last Modified: 2010-04-23
I have an application that about 50 people are executing on their PC.   When the user saves in thier application, I need to update information in another application supported by a 3rd party.     To do this, they (the 3rd party) want me to write a file to a common drive on our server so they can pick it up and update their information.    My application doesn't provide a way for me to make the file name unique, so I need some type of executable I can run to move it from the user's harddrive to the server.    does that make sense?  
0
Comment
Question by:ksconn2
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
VBRocks earned 50 total points
ID: 18890702
Here's how you do it in VB.NET:

my.Computer.FileSystem.MoveFile(sourceFile, destinationFile)

0
 
LVL 27

Expert Comment

by:VBRocks
ID: 18890730
Here's VB6:

        Dim fso As Object
        Set fso = CreateObject("Scripting.FileSystemObject")
        fso.MoveFile "sourceFile", "destinationFile"

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

679 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