473,804 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Txt files & Organise

daniel aristidou
491 Contributor
Hey...

I've got a program...that organises customers...
I want to create text files of each day........cont aining 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 1308
kadghar
1,295 Recognized Expert Top Contributor
Hey...

I've got a program...that organises customers...
I want to create text files of each day........cont aining 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 Contributor
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
2596
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 gameloop.cpp phead.h has all my core declarations in it like my main globals. main.cpp has all my window initilization functions and my winproc loop.
1
1491
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 all our projects (usually abstract classes) 2. some classes/forms comprise of a functional module and go as one unit
12
1738
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 cast the integer into char and run a for loop on the outside? Thanks
1
7148
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 RootSource\Web (which has web stuff) RootSource\Business (which has class libraries)
8
1664
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 consideration all pros and cons the question is where to store these pictures in DB or in files?
2
4284
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 functioning as desired when I test it on my machine using Visual Studio 2005. From what I have determined, the files I am forgetting are the JavaScript files from the Microsoft AJAX Library (See "To install Microsoft AJAX Library" at the bottom of...
5
1557
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
2785
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 uploads, to the clients accounts. I have seen similar sites everywhere, such as bank websites, USPS site, et cetera. What is required to accomplish this? I'm trying to do this with the PHP, MySQL and Adobe CS3 Master collection's 'Dreamweaver CS3' ...
3
5198
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
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9571
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.