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

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

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

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

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

دسترسی به سیستم فایل کامپیوتر با آبجکت FileSystemObject



موارد زیر به کراّت در این بلاگ یادآوری شده



Scripting.FileSystemObject




 پراپرتی یا ویژگیها

Properties

Drives
می توان در این مجموعه برای گرفتن درایوها لوپ زد  پراپرتی های شئ Drive را در پائینتر مشاهده کنید
'Returns a collection of all Drive objects on the computer.
Name
'Sets or returns the name of a specified file or folder.
Path
'Returns the path for a specified file, folder, or drive.
Size
'For files, returns the size, in bytes, of the specified file; for folders, returns the size, in bytes, of all files and subfolders contained in the folder.
Type
'Returns information about the type of a file or folder (for example, for files ending in .TXT, "Text Document" is returned).






Drive Object Properties : 

AvailableSpace
'Returns the amount of available space to a user on a specified drive or network share.
DriveLetter
'Returns one uppercase letter that identifies the local drive or a network share.
DriveType
'Returns the type of a specified drive.FileSystemReturns the file system in use for a specified drive.
FreeSpace
'Returns the amount of free space to a user on a specified drive or network share.
IsReady
'Returns true if the specified drive is ready, and false if not.
Path
'Returns an uppercase letter followed by a colon that indicates the path name for a specified drive.
RootFolder
'Returns a Folder object that represents the root folder of a specified drive.
SerialNumber
'Returns the serial number of a specified drive.
ShareName
'Returns the network share name for a specified drive.
TotalSize
'Returns the total size of a specified drive or network share.
VolumeName
'Sets or returns the volume name of a specified drive.



متدهای شئ FileSystemObject


Methods : 

CopyFile
CopyFolder
CreateFolder
CreateTextFile

DeleteFile
DeleteFolder
DriveExists
FileExists
FolderExists

GetAbsolutePathName
GetBaseName
'Returns the base name of a specified file or folder.
GetDrive
'Returns a Drive object corresponding to the drive in a specified path.
GetDriveName
'Returns the drive name of a specified path.
GetExtensionName
'Returns the file extension name for the last component in a specified path.
GetFile
'Returns a File object for a specified path.
GetFileName
'Returns the file name or folder name for the last component in a specified path.
GetFolder
'Returns a Folder object for a specified path.
GetParentFolderName
'Returns the name of the parent folder of the last component in a specified path.
GetSpecialFolder
'Returns the path to some of Windows' special folders.
Move
MoveFile
MoveFolder
OpenAsTextStream

'Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file.
OpenTextFile
'Opens a file and returns a TextStream object that can be used to access the file.
WriteLine
'Writes a specified string and new-line character to a TextStream file.



در ابتدا با استفاده از متد CreateObject شئ FileSystemObject را ایجاد کنید و بعد از متدها و ویژگیهای آن استفاده کنید.





آذر سال ۱۴۰۲ :













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