473,396 Members | 2,017 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,396 software developers and data experts.

Create Txt files & Organise

daniel aristidou
491 256MB
Hey...

I've got a program...that organises customers...
I want to create text files of each day........containing the IDs of customers seen........ However i want to organise the Text files in folders for each month...how should i go about creating the files and folders...?
Feb 1 '08 #1
2 1285
kadghar
1,295 Expert 1GB
Hey...

I've got a program...that organises customers...
I want to create text files of each day........containing the IDs of customers seen........ However i want to organise the Text files in folders for each month...how should i go about creating the files and folders...?
first of all, use smart names for the folders:

Jan2008, Feb2008, etc.. is a good idea.
use a function that creates the folder each time with an error handler, so if the folder already exists, it wont do anything.

so each time you generate a report:

Expand|Select|Wrap|Line Numbers
  1. dim path as string
  2. on error resume next
  3. mkdir "c:\yourpath\" & MonthFunction(month(date)) & Year(date) & "\"
  4. on error goto 0
  5. '[your code for creating the txt file and save it in Path]
Create a MonthFunction to write Jan, Feb, Mar... using Select Case.

I think that's the main idea. Use smart names for the files too, it'll save you a lot of time in the future.

HTH

[Edit]Note: how to create the txt file depends on the version, but using OPEN/ FOR/AS , then PRINT and then CLOSE, should do for most of the cases.[/edit]
Feb 1 '08 #2
daniel aristidou
491 256MB
Great thanks ill try it tonight
Feb 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Daniel Moree | last post by:
I'm using MS VC++ 6.0 I'm working on a big project. I've currently have several files for this project. Here's the problem. I have one header file phead.h I have two code files main.cpp and...
1
by: SanjayJain | last post by:
using vs2003/c# we have several medium to large projects How should we organise our source files i.e. directories / namespaces / assemblies etc 1. some classes/groups of classes are used in...
12
by: csnataraj | last post by:
Howdy all Could anyone suggest a short way to open a sequence of files one at a time using a for loop?. Say files of the form filename.0,filename.1,filename.2,...,filename.n. Would it work to...
1
by: kplkumar | last post by:
Hi I am new to this. I am trying to create a setup project to package our stuff and create an installer. This is what I want to do, I have a directory sructure in which we have our...
8
by: romayankin | last post by:
I'm making some kind of news-board site on PHP (tthat's why I guess it's the right place to post the question here). Each entry would have a small picture (less then 100kb). Taking into...
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
5
by: jyck91 | last post by:
Can anyone give me some ideas to organise a composition analyzer in C? It analyses an english composition. What functions should it include? eg. frequency of letter/ words thanks for help
2
by: nja2222 | last post by:
I would like to create a page for my clients to login and check for updates on their accounts. Then I would like to create a page where my employees can login and make updates, specifically new file...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
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:
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.