469,920 Members | 2,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

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 4676
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 Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.