Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Need to get the File Size?  (Read 3489 times)

0 Members and 1 Guest are viewing this topic.

vinoth124

    Topic Starter


    Rookie

    Need to get the File Size?
    « on: July 15, 2008, 06:01:11 AM »
    Hi Friend,

    I need to know the DOS command to get the size of the file.

    For example, i am having file named as "Vinoth.Txt" with the size of 80Kb.
    I need know the size of that file using dos command. And also i need to print that Size using echo statement.

    Please help me to resolve this issue.

    Thanks in advance.

    Regards,
    Vinoth R :)

    Dias de verano

    • Guest
    Re: Need to get the File Size?
    « Reply #1 on: July 15, 2008, 06:05:21 AM »
    set filename=Vinoth.txt
    for /f %%A in (%filename%) do set filesize=%%~zA
    echo file size is %filesize% bytes