我可以在TransferText导入中使用通配符吗? [英] Can I use wildcards in TransferText import?
本文介绍了我可以在TransferText导入中使用通配符吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要每天导入一个文本文件。我下载文件
并将名称更改为标准名称,然后运行代码将文件导入我的数据库中的表格。问题是文件
以标准名称开头,但是将日期和其他一些东西添加到文件名末尾的
。有没有办法可以使用通配符,比如
" *"所以我不需要更改名称?
感谢您的帮助
I need to import a text file pretty much daily. I download the file
and change the name to a standard name and then run the code to import
the file into a table in my database. The problem is that the file
starts with a standard name but adds the date and some other stuff to
the end of the file name. Is there a way I could use a wildcard like
"*" so I wouldn''t have to change the name?
Thanks for any help
推荐答案
否,你不能 - 当文件系统打开文件时,它需要一个合法的名称。
但你可以编写代码来获取通过Dir使用通配符的名称()
功能,然后使用你得到的名字....
-
MichKa [MS]
NLS整理/地区/键盘开发
全球化基础设施和字体技术
该帖子按原样提供。与
无保证,并且不授予任何权利。
Shyguy < SH **** @ aol.com>在消息中写道
新闻:o4 ******************************** @ 4ax.com ...
No, you cannot -- when the filesystem opens a file it needs a legal name.
But you can write code to get the name that uses wildcards via the Dir()
function, and then use the name you get....
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
This posting is provided "AS IS" with
no warranties, and confers no rights.
"Shyguy" <sh****@aol.com> wrote in message
news:o4********************************@4ax.com...
我需要每天导入一个文本文件。我下载文件
并将名称更改为标准名称,然后运行代码将文件导入到我的数据库中的表中。问题是文件
以标准名称开头,但是将日期和其他一些东西添加到文件名的末尾。有没有办法可以使用像
*这样的通配符。所以我不需要更改名称?
感谢您的帮助
I need to import a text file pretty much daily. I download the file
and change the name to a standard name and then run the code to import
the file into a table in my database. The problem is that the file
starts with a standard name but adds the date and some other stuff to
the end of the file name. Is there a way I could use a wildcard like
"*" so I wouldn''t have to change the name?
Thanks for any help
我''我不确定我会效仿。原始文件名不使用通配符。
它只有不同的结尾。你是说我可以写代码吗?
将文件名改成特定名称?
2004年6月10日星期四20:10:42 -0700 ,Michael \(michka \)Kaplan [MS]"
< mi ***** @ online.microsoft.com>写道:
I''m not sure I follow. The original filename doesn''t use wildcards.
it just has different endings. Are you saying I can write code to
change the file name into a specific name?
On Thu, 10 Jun 2004 20:10:42 -0700, "Michael \(michka\) Kaplan [MS]"
<mi*****@online.microsoft.com> wrote:
不,你不能 - 当文件系统打开文件时,它需要一个合法的名称。
但你可以编写代码来获取通过名称使用通配符的名称Dir()
函数,然后使用你得到的名字....
No, you cannot -- when the filesystem opens a file it needs a legal name.
But you can write code to get the name that uses wildcards via the Dir()
function, and then use the name you get....
你可以写代码到
(1)检测文件名(使用通配符)
(2)在您对TransferText的调用中使用检测到的文件名
-
MichKa [MS]
NLS整理/现场/键盘开发
全球化基础设施和字体技术
此帖子按原样提供。与
无保证,并且不授予任何权利。
Shyguy < SH **** @ aol.com>在消息中写道
news:46 ******************************** @ 4ax.com ...
You can write code to
(1) detect the filename (using wildcards)
(2) use that detected filename in your call to TransferText
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
This posting is provided "AS IS" with
no warranties, and confers no rights.
"Shyguy" <sh****@aol.com> wrote in message
news:46********************************@4ax.com...
我不确定我是否跟进。原始文件名不使用通配符。
它只有不同的结尾。您是说我可以编写代码来将文件名更改为特定名称吗?
2004年6月10日星期四20:10:42 -0700,Michael \(michka) \)Kaplan [MS]"
< mi ***** @ online.microsoft.com>写道:
I''m not sure I follow. The original filename doesn''t use wildcards.
it just has different endings. Are you saying I can write code to
change the file name into a specific name?
On Thu, 10 Jun 2004 20:10:42 -0700, "Michael \(michka\) Kaplan [MS]"
<mi*****@online.microsoft.com> wrote:
不,你不能 - 当文件系统打开文件时,它需要一个合法的名称。
但你可以编写代码来获取通过名称使用通配符的名称Dir()
函数,然后使用你得到的名字....
No, you cannot -- when the filesystem opens a file it needs a legal name.
But you can write code to get the name that uses wildcards via the Dir()
function, and then use the name you get....
这篇关于我可以在TransferText导入中使用通配符吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文