472,146 Members | 1,435 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 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 4718
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by martijn | last post: by
10 posts views Thread by kokirichild | last post: by
9 posts views Thread by AWW | last post: by
reply views Thread by leo001 | last post: by

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.