本帖最后由 c_hua6280 于 2011-02-23 11:15:02 编辑

解决方案 »

  1.   

    现在我给数据加了后缀了,请问如何把加完之后执行后再给后缀去掉呢。
                For Each f As String In System.IO.Directory.GetFiles(_dataFileDir, CStr(dtHashTableConstIfId.Item(_pgm_id)) & "*")
                    If Not IO.Path.GetExtension(f).ToLower = ".dat" Then
                        IO.File.Move(f, IO.Path.ChangeExtension(f, ".dat"))
                    End If
                Next
    如何给去掉后缀呢
    IO.File.Move(f, IO.Path.ChangeExtension(f, ""))  这样可以吗
      

  2.   


                'バックアップファイルの名前を定義するために、拡張子を削除する、
                For Each f As String In System.IO.Directory.GetFiles(strBackUpFileAll, CStr(dtHashTableConstIfId.Item(_pgm_id)) & "*")                If IO.Path.GetExtension(f).ToLower = ".dat" Then
                        If File.Exists(strBackUpFileAll & "\" & IO.Path.GetFileNameWithoutExtension(f)) Then
                            File.Delete(strBackUpFileAll & "\" & IO.Path.GetFileNameWithoutExtension(f))
                        End If
                        IO.File.Move(f, IO.Path.ChangeExtension(f, ""))                End If
                Next
    已解决,估计上面的只能加后缀然后再删除后缀的形势来实现了
      

  3.   


    load data
    infile *
    into table tablename
    replace
    fields terminater by ',' optionally enclose by '"'
    (
     字段1,
     字段2,
     
     字段n
    )   后缀名为.csv  
    或者写成*也行!
      

  4.   

    我的意思是我的数据文件没有扩展名 呵呵  现在的做法是修改了扩展名.dat 之后导入成功后再把后缀名删除了,用的是这种方式解决的。