Is there a 4GB size limit when using VBScript to make file copies?
John Savill
October 15, 2006
1 Min Read
A. I recently received an email message from a reader who had the belief that a script couldn't copy files over 4GB in size. I decided to test whether this was true.
First, I created a 5GB file by using this command:
D:temp>fsutil file createnew orig.file 5000000000
Then I wrote the following short script to copy a named file:
On Error Resume Next'Connect to file system object.set objFSO=CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(objVHD.HardDisk.file) Then objFSO.CopyFile WScript.Arguments(0), WScript.Arguments(1)End If
The VBScript script copied the 5GB file just fine. The 4GB limitation could have been because it was copying to a FAT32 partition or because differently formatted drives might use different amounts of disk space while storing the same amount of data.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like