ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] With Application.FileSearch µLªk¨Ï¥Î

[µo°Ý] With Application.FileSearch µLªk¨Ï¥Î

Dear ¤j¤j,
   ¤§«e¥Îoffice 97®É§Ú³£¨Ï¥ÎWith Application.FileSearch§äÀÉ®×
   ¤µ¤Ñ¥Î¤£¦Pªºofficeª©¥»¤~µo²{office§ïª©«á¤v¸g¤£¯à¦A¥Î¤F,
    ½Ð°Ý¦U¦ì«e¤j¤j,¥H¤Uµ{¦¡½XÀ³¸Ó«ç»ò­×§ï¤~¦n?


  With Application.FileSearch
    .NewSearch
    .LookIn = FilePath
    .Filename = ".txt"
    .SearchSubFolders = False
    .Execute
   
    For i = 1 To .FoundFiles.Count
     Cells(RowIdx, 1) = FileDateTime(.FoundFiles(i))
     Cells(RowIdx, 1).Select
      FName = .FoundFiles(i)
      Cells(RowIdx, ColIdx).Select
      
      Open FName For Input As #1
       .
       .

Sub ¤å¥ó()
Set file = CreateObject("scripting.filesystemobject")
For Each fils In file.getfolder("c:\").Files
Filename = Filename & fils.Name & Chr(13)
Next
MsgBox Filename
End Sub
¬Ý¬Ý这个
学习

TOP

¦^´_ 1# cw3076


    MyPath = "d:\test\"
    MyFile = Dir(MyPath & "*.Txt")
    RowIdx = 1
    Do While MyFile <> ""
        Cells(RowIdx, 1) = FileDateTime(MyPath & MyFile)
        Cells(RowIdx, 1).Select
        Open MyPath & MyFile For Input As #1
        ''
        ''
        ''
        MyFile = Dir
        RowIdx = RowIdx + 1
    Loop

TOP

·PÁ wqfzqgk & GBKEEª©¤jªº«ü¾É,

   GBKEE ª©¤j©Ò´£¨Ñªº¥¿¬O§Ú·Q­nªº~~ ¸U¤À·PÁÂ

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD