473,395 Members | 1,401 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,395 software developers and data experts.

Filename Increments

benchpolo
142 100+
I have an automated process that I need to produce incremental filenames so that when the sql process runs multiple times the file will be incremented, but I cannot find or figure out how to write this code.

For example, arcca_daily_incoming_1.asc , this is the filename for the first run then when the process executes again on the same the the filename would be arcca_daily_incoming_2.asc then arcca_daily_incoming_3.asc .. make sense?

Can someone assist me with the code or point me where I can mirror the code? I have never written this kind of process before.

You assitance will be appreciated.

Thanks.
Jul 8 '09 #1
4 1478
ck9663
2,878 Expert 2GB
Will the process execute once, meaning all these files will be created at once? Or your process will execute in a defined frequency that it will start from the last file created from the previous process and go from there?


--- CK
Jul 8 '09 #2
benchpolo
142 100+
The process is automated so if it runs succesfully for that day it will be arcca_daily_incoming_1.asc, but if the automated process is run manually it should not create arcca_daily_incoming_1.asc instead it should increment to arcca_daily_incoming_2.asc
Jul 8 '09 #3
ck9663
2,878 Expert 2GB
In that case, you have to check first if there are existing files on your target folder. If there are, you have grab the last increment number and start from there, if no file are existing, start from 1, then loop. You have to do all this using dynamic query.

Happy Coding!

--- CK
Jul 8 '09 #4
Jerry Winston
145 Expert 100+
Perhaps it would be more useful if you used a time/date combination to name your erudite files. As your process continues to run, filename_#.ext becomes less useful to placing the file name into a useful context such as when an event/error occurred.

That's it. I'm out of change.

That was my last two cents.
Jul 29 '09 #5

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

Similar topics

10
by: anonymousnerd | last post by:
Apologies if this question seems stupid: How does one write a function that increments a value in Python? When I tried, the variable never changed. The session went like this: >>> def...
0
by: Nick | last post by:
Is it possible to have multiple auto increments in one column? Say I have two tables... 1. table 'messageboards' with fields ('id' , 'name') 2. table 'messagethreads' with fields ('id' ,...
5
by: someone | last post by:
Hi All, I need a function that only allows Increments by 10, 20, 30..... How do I achieve this in VB Script? Any help is appreciated. TIA,
12
by: Jim Fox | last post by:
I never noticed this myself. Had a user bring this up when then were updating a field that is a NUMBER, LONG INTEGER field. In successive rows, they entered into. 3 (typed in row 1) 4 (typed...
14
by: tlyczko | last post by:
I am looking to validate time worked in quarter-hour increments, e.g. ..25, .5, .75, 1.0, etc. etc. I know I can use a modulo statement for the evaluation but I could not find an explanation of...
3
by: forum | last post by:
Hi! what's the standard way for a "for" loop with float increments? Anton
7
by: Joe | last post by:
Is there a formula or algorhythm I can use to round up a series of numbers in increments of 100? 36 =100 89 =100 102 =200 112 =200 5 =100 225 =300
0
brokensword008
by: brokensword008 | last post by:
Hello everyone. I'm new here. I have a problem with Expression Web. I have more than a hundred pages created from my self-made template. My website sells products so I subscribed to RomanCart for...
1
by: phpuser123 | last post by:
I have a page that increments my session everytime,my passowrd and username are not correct..Buteven when I am reloading my page,the session is beinng incremented and as such I amgetting a defective...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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,...

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.