کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

FileSystemObject



("Set fso=CreateObject("Scripting.FileSystemObject
    (Set fld = fso.GetFolder(strSourcePath

For Each sfldr in fld.Subfolders
Debug.Print sfldr.Name
Next

 گرفتن فایل های داخل فولدر 

Set fls=fld.Files
 For Each f In  fls
Debug.Print f.Name
Next


MethodDescription
CopyFileUsed to copy an existing file.
CopyFolderUsed to copy an existing folder.
CreateFolderUsed to create a folder.
CreateTextFileUsed to create a text file.
DeleteFileUsed to delete a file.
DeleteFolderUsed to delete a folder.
DriveExistsUsed to determine whether a drive exists.
FileExistsUsed to determine whether a file exists.
FolderExistsUsed to determine whether a folder exists.
GetAbsolutePathNameUsed to return the full path name.
GetDriveUsed to return a specified drive.
GetDriveNameUsed to return the drive name.
GetFileUsed to return a specified file.
GetFileNameUsed to return the file name.
GetFolderUsed to return a specified folder.
GetParentFolderNameUsed to return the name of the parent folder.
GetTempNameUsed to create and return a string representing a file name.
MoveFileUsed to move a file.
MoveFolderUsed to move a folder.
OpenTextFileUsed to open an existing text file


r = Range("A65536").End(xlUp).Row + 1

For Each FileItem In SourceFolder.Files

    'Display file properties
     Cells(r, 1).Formula = FileItem.Name
     Cells(r, 2).Formula = FileItem.Path
     Cells(r, 3).Formula = FileItem.Size
     Cells(r, 4).Formula = FileItem.DateCreated
     Cells(r, 5).Formula = FileItem.DateLastModified
     
     r = r + 1
     
Next FileItem

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد