473,383 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

FileListBox copy / save to specific file name

Bob
Hello

I have not used a File list box before. But it may be the only choice
I have to get the results I need.

What I need to do is populate the File list box with the files on the
A:\ drive. Then have the user select the file they want and have it
copied to a folder C:\Import as import.txt. It is a text based file
they will be copying but the file must be named "import.txt" Could
someone please help me out with this. It will be used with another
program so I just need a way to have it named

Thank you very much
Bob

Jul 17 '05 #1
1 4757
Bob <rt*********@thenet.net> wrote in message news:<4s********************************@4ax.com>. ..
Hello

I have not used a File list box before. But it may be the only choice
I have to get the results I need.
I don't see why from your description but in general I'd ddrop the
drive, dir and file list boxes anyway. doing your own code makes it
easier to control what appears and how they act.
What I need to do is populate the File list box with the files on the
A:\ drive. Then have the user select the file they want and have it
copied to a folder C:\Import as import.txt. It is a text based file
they will be copying but the file must be named "import.txt" Could
someone please help me out with this. It will be used with another
program so I just need a way to have it named


VB's FileCopy statement will let you do that

FileCopy sourcepath, "C:\Import.TXT"

you may also need to use Kill to delete previous versions of the
C:\Import.TXT file first
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: martijn | last post by:
Probably not the first time this one is asked in this group... The standard filelistbox does what it says, it lists files. But as all windows based dialogs offer file details etc. I think it...
2
by: Greg | last post by:
looking for an easy way for users to browse for a file on their local drive, and then have access automatically make a copy of that file (files will most likely be images) and save it under a new...
0
by: Pierre | last post by:
Hi, I'm trying to select specific nodes from a XmlDocument filled with a serialized object and to insert these nodes into another XmlDocument. The object is well serialized (see below). From a...
10
by: kokirichild | last post by:
Hi All! I've been scouring the web to no avail, but what I'm looking for is something similar to the FileListBox that was there in VB6 but seems to have been removed (or moved) in 2005. Does...
0
by: akoymakoy | last post by:
how do i link my dirlistbox to the filelistbox viceversa... I would like to use the path of the file selected in the filelistbox as a variable that i would use as a location for the DB that i will...
7
by: =?Utf-8?B?U2NhbmJveQ==?= | last post by:
Guyz, I have just learnt how to add the 'DriveListBox', 'DirListBox' and 'FileListBox' controls that were always included in the toolbox with VB 3.0 / 4.0 / 5.0, but always missing in VBE 2005....
1
by: awais1989 | last post by:
I have a FileListBox named File1. I want it to only display filename excluding extension, and when I click any file's name it will open the file.
0
by: Cancionero | last post by:
All, This is a simple problem that I, for some reason, am having a hard time with. Basically I am trying to rename all the files listed in a FileListBox based on a search and replace string. I...
9
by: AWW | last post by:
Running XP - Visual Studio 2005 - VB Want to have duplicate projects - one safe and stable - other for experimenting Can't fine easy way to make duplicate project. Stupid question? or stupid ME?...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.