Solved

Rename and move a file

Posted on 2007-04-11
3
159 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
Comment Utility
Here's how you do it in VB.NET:

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

0
 
LVL 27

Expert Comment

by:VBRocks
Comment Utility
Here's VB6:

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

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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 …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now