473,508 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

variable file import question

Hi all
I have a VB script to import a specific text file
call(s12.txt).
But the annoyting part is that the filename change all the time.
Today it may be S1205 tomorrow it may S121003. I keep have to rename
it to s12.txt. How do I call file i/o function and assign a variable
to the file name. Yes I do know the code for i/o function.
Nov 13 '05 #1
2 1651
One approach I've sometimes taken is simply to rename (or copy) the file to
the desired location/name.

"cong ngo" <co*****@yahoo.com> wrote in message
news:64*************************@posting.google.co m...
Hi all
I have a VB script to import a specific text file
call(s12.txt).
But the annoyting part is that the filename change all the time.
Today it may be S1205 tomorrow it may S121003. I keep have to rename
it to s12.txt. How do I call file i/o function and assign a variable
to the file name. Yes I do know the code for i/o function.

Nov 13 '05 #2
cong ngo wrote:
Hi all
I have a VB script to import a specific text file
call(s12.txt).
But the annoyting part is that the filename change all the time.
Today it may be S1205 tomorrow it may S121003. I keep have to rename
it to s12.txt. How do I call file i/o function and assign a variable
to the file name. Yes I do know the code for i/o function.


If you want to point to the file (using the standard Open File
interface) you can check

http://www.mvps.org/access/api/api0001.htm

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2545
by: thomasp | last post by:
In the code below I have a function that tests if a file exists. It takes a variable named strFileName, simple enough. My question is, is there a way to pass it a variable with another name as...
17
2685
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
8
8075
by: yinglcs | last post by:
Hi, I have the following code: colorIndex = 0; def test(): print colorIndex; This won't work. But it works if i do this:
2
1990
by: Bruza | last post by:
I am trying to define a class static variable. But the value of the static variable seems to be only defined inside the file that the class is declared. See the code below. When I run "python...
12
7909
by: Chris Allen | last post by:
Hello fellow pythoneers. I'm stumped on something, and I was hoping maybe someone in here would have an elegant solution to my problem. This is the first time I've played around with packages, so...
3
1130
by: FooFan | last post by:
Hi all, I'm trying to write a fairly simple program in Java that will allow the user to write to a text file, specifiying the File name and Content. I keep getting the same error though that...
4
2328
by: marc wyburn | last post by:
Hi I'm using SQlite and the CSV module and trying to create a class that converts data from CSV file into a SQLite table. My script curently uses functions for everything and I'm trying to...
0
995
by: Alexis Boutillier | last post by:
Hi, I have a strange behaviour of python with pdb and import statement. Here is the example code : file my1.py: import my2 file my2.py: a=5
0
136
by: Timothy Grant | last post by:
On Fri, Aug 29, 2008 at 12:48 AM, Alexis Boutillier <alexis.boutillier@arteris.comwrote: http://docs.python.org/ref/import.html -- Stand Fast, tjg.
0
7223
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
7114
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
7321
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,...
0
7377
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...
1
7034
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
5623
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,...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
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...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.