Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 27th, 2004, 03:35 PM
Registered User
Join Date: Feb 2004
Location: San Diego, CA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parse text files and save in sub directories

Hi, please help...

How can I create a function that parses multiple text file and after is done saves them in a sub directory.

So far I can identify the path of the files and if there is any text files available in the Path.

I am stuck in the parsing part, the parsing consist in taking a text file and get rid of the header files and saves them in a sub directory.

I appreciate your help in advance...


Have a nice day
Reply With Quote
  #2 (permalink)  
Old February 28th, 2004, 05:14 AM
Authorized User
Join Date: Aug 2003
Location: , , Belgium.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts

How about:

'Create the subfolder
MKDir path & "subfolder" 'might have to be "\subfolder"

'Copy the file to the subfolder [File Copy Source,Destination]
File Copy Path & FileName, Path & "subfolder\" & FileName

'Delete the file in the original folder
Kill Path & FileName

To get All the filenames in a folder you can use this one:
Dim strFile as string

strFile = Dir$(Path)

do until strFile = ""
    'action here
    strFile = Dir

Hope it helps

Reply With Quote
  #3 (permalink)  
Old March 1st, 2004, 09:32 AM
Friend of Wrox
Join Date: Jun 2003
Location: McPherson, Kansas, USA.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts

I would also look at using the File System Object library. You can read more about it in the online help file or MSDN.

Larry Asher
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
display directories and files using only xsl/xml.. eteune XSLT 1 January 2nd, 2007 07:01 PM
checking directories for files Trojan_uk Classic ASP Basics 1 March 16th, 2004 10:27 AM
Including same files in different directories jeremy108 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 8th, 2003 01:37 PM
Deleting directories and files ... DennisTh VB.NET 2002/2003 Basics 5 June 12th, 2003 02:30 PM

All times are GMT -4. The time now is 07:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.