Code:Set fso = CreateObject("Scripting.FileSystemObject") Set drv = fso.GetDrive(fso.GetDriveName((Mid(drive.Caption, 1, 2)))) Debug.Print "-------------------------------" Dim curDebug As Currency curDebug = CCur(drv.AvailableSpace) dd=FileLen(Format.Label2.Caption + Format.Label1.Caption) msgbox dd - curdebug
hi
im trying to create some code that will check if a drive has more space than the file im copying to the drive. if he file is larger than the space on the drive then returns error message.
has any tryed this as i cannot get it to work. i have tryed using the above to return the the file and drive size witch is ok but i cannot work out how to compaire them
any thought would be great




Reply With Quote