Forfiles.exe - reports incorrect files sizes for files over ~9/10GB
I am trying to write a command that will list all files in a folder over a certain size (these are sql server database files. While I have the syntax for a command to achieve this. example1 forfiles /P D:\SQLData /M *.* /C "cmd /c if @fsize gtr 2147 echo @path @fsize @fdate @ftime" <output> "D:\SQLData\DBfilename1.mdf" 2608660480 5/6/2012 8:00:37 AM "D:\SQLData\DBfilename2.mdf" 320274432 5/6/2012 8:00:37 AM example2 forfiles /P D:\SQLData /M *.* /C "cmd /c if @fsize gtr 2147483648 echo @path @fsize @fdate @ftime" This command gives no output as it never sees a file bigger than the value 2147483648, as the files over the 9GB never return the correct file size in bytes. Now the command works well, except that forfiles does not seem to report the correct file size on files over ~9/10GB (I am not sure of the exact figure, but it is around this value). The @fsize parameter never returns values larger than 10 characters in length. Is anyone else aware of this issue, or perhaps a fix? Cheers
May 7th, 2012 1:47am

ask in the scripting forum http://social.technet.microsoft.com/Forums/pl-pl/ITCG/threads http://www.arabitpro.com
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 3:15am

If you have PowerShell available you could also ask your question in the Windows PowerShell forums.
May 7th, 2012 3:47am

FYI: This is the second time I've done a search on Google.com, found EXACTLY the problem I'm having... then seeing a moderator telling the person to post somewhere else. This really needs to stop. Any other forum in the world, it's common courtesy for the moderator to move the thread to the right forum. Or, at the very minimum, remove the thread so it doesn't show up in Google search, only to lead to a dead end. The first time I saw this happen, I just shrugged it off. But, a second time... that sounds like an issue to me.
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 1:50pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics