ªð¦^¦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 : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD