Loading ...
Sorry, an error occurred while loading the content.

Re: [BATCH WORLD] Question about file size

Expand Messages
  • Patrick Donahue
    Hello Lamar, If you are using Windows 2000 or windows XP you can use some of the enhanced power of the FOR command to do what you want/ The command FOR %I in
    Message 1 of 6 , Sep 8, 2004
    • 0 Attachment
      Hello Lamar,

      If you are using Windows 2000 or windows XP you can use some of the
      enhanced power of the FOR command to do what you want/

      The command

      FOR %I in (*.*) do @echo %~fI %~ZI

      will display the path of each file (%~fI) and the size of the file
      (%~ZI) on the same line.

      If all of the files are in the same directory structure, the following
      command may do what you want:
      for /F "usebackq delims=*" %I in (`dir /s /b ROOTPATH\archive.pst`)
      do @echo %~fI %~zI

      usepackq allows you to use FOR to parse the output of the text between
      the back quotes.

      delims=* is necessary because otherwise any spaces in the file names
      or path names will be interpreted as the end of the path. Since *
      will never be a part of a file name or path, setting it as the
      delimiter will allow the for command to get the whole file name.

      If you are using win9x or ME it may be easer to use VB Script to get
      the results you need.

      Best Wishes,
      Patrick

      On Wed, 8 Sep 2004 16:36:25 -0500, Morris, Lamar <lamarmorris@...> wrote:
      >
      > I have the UNC path to a bunch of PST files and I'm trying to pull off
      > the size of the files. Is there a way using the dir cmd and some other
      > script to append the file size to the end of the path, it would save me
      > lots of editing time.
      >
      > The file paths are listed like this.
      >
      > \\dolphin\d5\a0016588\Personal\Email\archive.pst
      >
      > The output looks like this.
      >
      > Directory of \\dolphin\d5\a0016588\Personal\Email
      >
      > 11/10/2000 06:57a 18,006,016 archive.pst
      >
      > 1 File(s) 18,006,016 bytes
      >
      > 0 Dir(s) 23,470,276,608 bytes free
      >
      > Volume in drive \\dolphin\d5 is D5
      >
      > Volume Serial Number is 0702-76F1
      >
      > Any help would be appreciated.
      >
      > Regards
      >
      > Lamar Morris
      >
      > Texas Instruments - WWMake Infrastructure Team
      >
      > * <mailto:LamarMorris@...> email: LamarMorris@... - *office:
      > 972-927-7169
      >
      > * <mailto:searun@...> team email: searun@...
      > <mailto:searun@...> - *mobile: 214-882-4187
      >
      > *web: http://cyborg.de.sc.ti.com/ <http://cyborg.de.sc.ti.com/>
      >
      > [Non-text portions of this message have been removed]
      >
      >
      > To Post a message, send it to: batchworld@...
      >
      > To Unsubscribe, send a blank message to: batchworld-unsubscribe@...
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
    • Morris, Lamar
      Thanks for the input, I have all OS s available but primarily use win2k. I ll play with it tomorrow. Lamar _____ From: Patrick Donahue [mailto:dylan@charm.net]
      Message 2 of 6 , Sep 8, 2004
      • 0 Attachment
        Thanks for the input, I have all OS's available but primarily use win2k.
        I'll play with it tomorrow.



        Lamar



        _____

        From: Patrick Donahue [mailto:dylan@...]
        Sent: Wednesday, September 08, 2004 5:54 PM
        To: batchworld@yahoogroups.com
        Subject: Re: [BATCH WORLD] Question about file size



        Hello Lamar,

        If you are using Windows 2000 or windows XP you can use some of the
        enhanced power of the FOR command to do what you want/

        The command

        FOR %I in (*.*) do @echo %~fI %~ZI

        will display the path of each file (%~fI) and the size of the file
        (%~ZI) on the same line.

        If all of the files are in the same directory structure, the following
        command may do what you want:
        for /F "usebackq delims=*" %I in (`dir /s /b ROOTPATH\archive.pst`)
        do @echo %~fI %~zI

        usepackq allows you to use FOR to parse the output of the text between
        the back quotes.

        delims=* is necessary because otherwise any spaces in the file names
        or path names will be interpreted as the end of the path. Since *
        will never be a part of a file name or path, setting it as the
        delimiter will allow the for command to get the whole file name.

        If you are using win9x or ME it may be easer to use VB Script to get
        the results you need.

        Best Wishes,
        Patrick

        On Wed, 8 Sep 2004 16:36:25 -0500, Morris, Lamar <lamarmorris@...>
        wrote:
        >
        > I have the UNC path to a bunch of PST files and I'm trying to pull off
        > the size of the files. Is there a way using the dir cmd and some other
        > script to append the file size to the end of the path, it would save
        me
        > lots of editing time.
        >
        > The file paths are listed like this.
        >
        > \\dolphin\d5\a0016588\Personal\Email\archive.pst
        >
        > The output looks like this.
        >
        > Directory of \\dolphin\d5\a0016588\Personal\Email
        >
        > 11/10/2000 06:57a 18,006,016 archive.pst
        >
        > 1 File(s) 18,006,016 bytes
        >
        > 0 Dir(s) 23,470,276,608 bytes free
        >
        > Volume in drive \\dolphin\d5 is D5
        >
        > Volume Serial Number is 0702-76F1
        >
        > Any help would be appreciated.
        >
        > Regards
        >
        > Lamar Morris
        >
        > Texas Instruments - WWMake Infrastructure Team
        >
        > * <mailto:LamarMorris@...> email: LamarMorris@... - *office:
        > 972-927-7169
        >
        > * <mailto:searun@...> team email: searun@...
        > <mailto:searun@...> - *mobile: 214-882-4187
        >
        > *web: http://cyborg.de.sc.ti.com/ <http://cyborg.de.sc.ti.com/>
        >
        > [Non-text portions of this message have been removed]
        >
        >
        > To Post a message, send it to: batchworld@...
        >
        > To Unsubscribe, send a blank message to:
        batchworld-unsubscribe@...
        > Yahoo! Groups Links
        >
        >
        >
        >
        >


        To Post a message, send it to: batchworld@...

        To Unsubscribe, send a blank message to:
        batchworld-unsubscribe@...





        Yahoo! Groups Sponsor

        ADVERTISEMENT
        click here
        <http://us.ard.yahoo.com/SIG=129ooc73e/M=295196.4901138.6071305.3001176/
        D=groups/S=1707208579:HM/EXP=1094770428/A=2128215/R=0/SIG=10se96mf6/*htt
        p:/companion.yahoo.com>


        <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
        s/S=:HM/A=2128215/rand=618094405>



        _____

        Yahoo! Groups Links

        * To visit your group on the web, go to:
        http://groups.yahoo.com/group/batchworld/

        * To unsubscribe from this group, send an email to:
        batchworld-unsubscribe@yahoogroups.com
        <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>

        * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
        Service <http://docs.yahoo.com/info/terms/> .



        [Non-text portions of this message have been removed]
      • FrancoisSoft MM
        Hmm... batch files seem to be as strong as Macro Development Kit but not in all ways... ...
        Message 3 of 6 , Sep 8, 2004
        • 0 Attachment
          Hmm... batch files seem to be as strong as Macro
          Development Kit but not in all ways...

          --- "Morris, Lamar" <LamarMorris@...> wrote:

          > Thanks for the input, I have all OS's available but
          > primarily use win2k.
          > I'll play with it tomorrow.
          >
          >
          >
          > Lamar
          >
          >
          >
          > _____
          >
          > From: Patrick Donahue [mailto:dylan@...]
          > Sent: Wednesday, September 08, 2004 5:54 PM
          > To: batchworld@yahoogroups.com
          > Subject: Re: [BATCH WORLD] Question about file size
          >
          >
          >
          > Hello Lamar,
          >
          > If you are using Windows 2000 or windows XP you can
          > use some of the
          > enhanced power of the FOR command to do what you
          > want/
          >
          > The command
          >
          > FOR %I in (*.*) do @echo %~fI %~ZI
          >
          > will display the path of each file (%~fI) and the
          > size of the file
          > (%~ZI) on the same line.
          >
          > If all of the files are in the same directory
          > structure, the following
          > command may do what you want:
          > for /F "usebackq delims=*" %I in (`dir /s /b
          > ROOTPATH\archive.pst`)
          > do @echo %~fI %~zI
          >
          > usepackq allows you to use FOR to parse the output
          > of the text between
          > the back quotes.
          >
          > delims=* is necessary because otherwise any spaces
          > in the file names
          > or path names will be interpreted as the end of the
          > path. Since *
          > will never be a part of a file name or path, setting
          > it as the
          > delimiter will allow the for command to get the
          > whole file name.
          >
          > If you are using win9x or ME it may be easer to use
          > VB Script to get
          > the results you need.
          >
          > Best Wishes,
          > Patrick
          >
          > On Wed, 8 Sep 2004 16:36:25 -0500, Morris, Lamar
          > <lamarmorris@...>
          > wrote:
          > >
          > > I have the UNC path to a bunch of PST files and
          > I'm trying to pull off
          > > the size of the files. Is there a way using the
          > dir cmd and some other
          > > script to append the file size to the end of the
          > path, it would save
          > me
          > > lots of editing time.
          > >
          > > The file paths are listed like this.
          > >
          > > \\dolphin\d5\a0016588\Personal\Email\archive.pst
          > >
          > > The output looks like this.
          > >
          > > Directory of \\dolphin\d5\a0016588\Personal\Email
          > >
          > > 11/10/2000 06:57a 18,006,016 archive.pst
          > >
          > > 1 File(s) 18,006,016 bytes
          > >
          > > 0 Dir(s) 23,470,276,608 bytes free
          > >
          > > Volume in drive \\dolphin\d5 is D5
          > >
          > > Volume Serial Number is 0702-76F1
          > >
          > > Any help would be appreciated.
          > >
          > > Regards
          > >
          > > Lamar Morris
          > >
          > > Texas Instruments - WWMake Infrastructure Team
          > >
          > > * <mailto:LamarMorris@...> email:
          > LamarMorris@... - *office:
          > > 972-927-7169
          > >
          > > * <mailto:searun@...> team email:
          > searun@...
          > > <mailto:searun@...> - *mobile:
          > 214-882-4187
          > >
          > > *web: http://cyborg.de.sc.ti.com/
          > <http://cyborg.de.sc.ti.com/>
          > >
          > > [Non-text portions of this message have been
          > removed]
          > >
          > >
          > > To Post a message, send it to:
          > batchworld@...
          > >
          > > To Unsubscribe, send a blank message to:
          > batchworld-unsubscribe@...
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          >
          >
          > To Post a message, send it to:
          > batchworld@...
          >
          > To Unsubscribe, send a blank message to:
          > batchworld-unsubscribe@...
          >
          >
          >
          >
          >
          > Yahoo! Groups Sponsor
          >
          > ADVERTISEMENT
          > click here
          >
          <http://us.ard.yahoo.com/SIG=129ooc73e/M=295196.4901138.6071305.3001176/
          >
          D=groups/S=1707208579:HM/EXP=1094770428/A=2128215/R=0/SIG=10se96mf6/*htt
          > p:/companion.yahoo.com>
          >
          >
          >
          <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
          > s/S=:HM/A=2128215/rand=618094405>
          >
          >
          >
          > _____
          >
          > Yahoo! Groups Links
          >
          > * To visit your group on the web, go to:
          > http://groups.yahoo.com/group/batchworld/
          >
          > * To unsubscribe from this group, send an email to:
          > batchworld-unsubscribe@yahoogroups.com
          >
          <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>
          >
          >
          > * Your use of Yahoo! Groups is subject to the Yahoo!
          > Terms of
          > Service <http://docs.yahoo.com/info/terms/> .
          >
          >
          >
          > [Non-text portions of this message have been
          > removed]
          >
          >




          __________________________________
          Do you Yahoo!?
          New and Improved Yahoo! Mail - Send 10MB messages!
          http://promotions.yahoo.com/new_mail
        • Morris, Lamar
          This is what I get when I run the script. I was unexpected at this time. Lamar _____ From: Patrick Donahue [mailto:dylan@charm.net] Sent: Wednesday,
          Message 4 of 6 , Sep 9, 2004
          • 0 Attachment
            This is what I get when I run the script.

            "I was unexpected at this time."



            Lamar



            _____

            From: Patrick Donahue [mailto:dylan@...]
            Sent: Wednesday, September 08, 2004 5:54 PM
            To: batchworld@yahoogroups.com
            Subject: Re: [BATCH WORLD] Question about file size



            Hello Lamar,

            If you are using Windows 2000 or windows XP you can use some of the
            enhanced power of the FOR command to do what you want/

            The command

            FOR %I in (*.*) do @echo %~fI %~ZI

            will display the path of each file (%~fI) and the size of the file
            (%~ZI) on the same line.

            If all of the files are in the same directory structure, the following
            command may do what you want:
            for /F "usebackq delims=*" %I in (`dir /s /b ROOTPATH\archive.pst`)
            do @echo %~fI %~zI

            usepackq allows you to use FOR to parse the output of the text between
            the back quotes.

            delims=* is necessary because otherwise any spaces in the file names
            or path names will be interpreted as the end of the path. Since *
            will never be a part of a file name or path, setting it as the
            delimiter will allow the for command to get the whole file name.

            If you are using win9x or ME it may be easer to use VB Script to get
            the results you need.

            Best Wishes,
            Patrick

            On Wed, 8 Sep 2004 16:36:25 -0500, Morris, Lamar <lamarmorris@...>
            wrote:
            >
            > I have the UNC path to a bunch of PST files and I'm trying to pull off
            > the size of the files. Is there a way using the dir cmd and some other
            > script to append the file size to the end of the path, it would save
            me
            > lots of editing time.
            >
            > The file paths are listed like this.
            >
            > \\dolphin\d5\a0016588\Personal\Email\archive.pst
            >
            > The output looks like this.
            >
            > Directory of \\dolphin\d5\a0016588\Personal\Email
            >
            > 11/10/2000 06:57a 18,006,016 archive.pst
            >
            > 1 File(s) 18,006,016 bytes
            >
            > 0 Dir(s) 23,470,276,608 bytes free
            >
            > Volume in drive \\dolphin\d5 is D5
            >
            > Volume Serial Number is 0702-76F1
            >
            > Any help would be appreciated.
            >
            > Regards
            >
            > Lamar Morris
            >
            > Texas Instruments - WWMake Infrastructure Team
            >
            > * <mailto:LamarMorris@...> email: LamarMorris@... - *office:
            > 972-927-7169
            >
            > * <mailto:searun@...> team email: searun@...
            > <mailto:searun@...> - *mobile: 214-882-4187
            >
            > *web: http://cyborg.de.sc.ti.com/ <http://cyborg.de.sc.ti.com/>
            >
            > [Non-text portions of this message have been removed]
            >
            >
            > To Post a message, send it to: batchworld@...
            >
            > To Unsubscribe, send a blank message to:
            batchworld-unsubscribe@...
            > Yahoo! Groups Links
            >
            >
            >
            >
            >


            To Post a message, send it to: batchworld@...

            To Unsubscribe, send a blank message to:
            batchworld-unsubscribe@...





            Yahoo! Groups Sponsor

            ADVERTISEMENT
            click here
            <http://us.ard.yahoo.com/SIG=129ooc73e/M=295196.4901138.6071305.3001176/
            D=groups/S=1707208579:HM/EXP=1094770428/A=2128215/R=0/SIG=10se96mf6/*htt
            p:/companion.yahoo.com>


            <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
            s/S=:HM/A=2128215/rand=618094405>



            _____

            Yahoo! Groups Links

            * To visit your group on the web, go to:
            http://groups.yahoo.com/group/batchworld/

            * To unsubscribe from this group, send an email to:
            batchworld-unsubscribe@yahoogroups.com
            <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>

            * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            Service <http://docs.yahoo.com/info/terms/> .



            [Non-text portions of this message have been removed]
          • Patrick Donahue
            Hi Lamar, When I built my for statement I was working fromt he command line. I forgot that to use the FOR statement in the batch file you will need to double
            Message 5 of 6 , Sep 9, 2004
            • 0 Attachment
              Hi Lamar,

              When I built my for statement I was working fromt he command line. I
              forgot that to use the FOR statement in the batch file you will need
              to double all the %s.

              Example:
              FOR %%I in (*.*) do @echo %%~fI %%~ZI

              Patrick

              On Thu, 9 Sep 2004 07:15:39 -0500, Morris, Lamar <lamarmorris@...> wrote:
              > This is what I get when I run the script.
              >
              > "I was unexpected at this time."
              >
              >
              > Lamar
              >
              > _____
              >
              > From: Patrick Donahue [mailto:dylan@...]
              > Sent: Wednesday, September 08, 2004 5:54 PM
              > To: batchworld@yahoogroups.com
              > Subject: Re: [BATCH WORLD] Question about file size
              >
              > Hello Lamar,
              >
              > If you are using Windows 2000 or windows XP you can use some of the
              > enhanced power of the FOR command to do what you want/
              >
              > The command
              >
              > FOR %I in (*.*) do @echo %~fI %~ZI
              >
              > will display the path of each file (%~fI) and the size of the file
              > (%~ZI) on the same line.
              >
              > If all of the files are in the same directory structure, the following
              > command may do what you want:
              > for /F "usebackq delims=*" %I in (`dir /s /b ROOTPATH\archive.pst`)
              > do @echo %~fI %~zI
              >
              > usepackq allows you to use FOR to parse the output of the text between
              > the back quotes.
              >
              > delims=* is necessary because otherwise any spaces in the file names
              > or path names will be interpreted as the end of the path. Since *
              > will never be a part of a file name or path, setting it as the
              > delimiter will allow the for command to get the whole file name.
              >
              > If you are using win9x or ME it may be easer to use VB Script to get
              > the results you need.
              >
              > Best Wishes,
              > Patrick
              >
              > On Wed, 8 Sep 2004 16:36:25 -0500, Morris, Lamar <lamarmorris@...>
              > wrote:
              > >
              > > I have the UNC path to a bunch of PST files and I'm trying to pull off
              > > the size of the files. Is there a way using the dir cmd and some other
              > > script to append the file size to the end of the path, it would save
              > me
              > > lots of editing time.
              > >
              > > The file paths are listed like this.
              > >
              > > \\dolphin\d5\a0016588\Personal\Email\archive.pst
              > >
              > > The output looks like this.
              > >
              > > Directory of \\dolphin\d5\a0016588\Personal\Email
              > >
              > > 11/10/2000 06:57a 18,006,016 archive.pst
              > >
              > > 1 File(s) 18,006,016 bytes
              > >
              > > 0 Dir(s) 23,470,276,608 bytes free
              > >
              > > Volume in drive \\dolphin\d5 is D5
              > >
              > > Volume Serial Number is 0702-76F1
              > >
              > > Any help would be appreciated.
              > >
              > > Regards
              > >
              > > Lamar Morris
              > >
              > > Texas Instruments - WWMake Infrastructure Team
              > >
              > > * <mailto:LamarMorris@...> email: LamarMorris@... - *office:
              > > 972-927-7169
              > >
              > > * <mailto:searun@...> team email: searun@...
              > > <mailto:searun@...> - *mobile: 214-882-4187
              > >
              > > *web: http://cyborg.de.sc.ti.com/ <http://cyborg.de.sc.ti.com/>
              > >
              > > [Non-text portions of this message have been removed]
              > >
              > >
              > > To Post a message, send it to: batchworld@...
              > >
              > > To Unsubscribe, send a blank message to:
              > batchworld-unsubscribe@...
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              > >
              >
              > To Post a message, send it to: batchworld@...
              >
              > To Unsubscribe, send a blank message to:
              > batchworld-unsubscribe@...
              >
              > Yahoo! Groups Sponsor
              >
              > ADVERTISEMENT
              > click here
              > <http://us.ard.yahoo.com/SIG=129ooc73e/M=295196.4901138.6071305.3001176/
              > D=groups/S=1707208579:HM/EXP=1094770428/A=2128215/R=0/SIG=10se96mf6/*htt
              > p:/companion.yahoo.com>
              >
              > <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
              > s/S=:HM/A=2128215/rand=618094405>
              >
              > _____
              >
              > Yahoo! Groups Links
              >
              > * To visit your group on the web, go to:
              > http://groups.yahoo.com/group/batchworld/
              >
              > * To unsubscribe from this group, send an email to:
              > batchworld-unsubscribe@yahoogroups.com
              > <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>
              >
              > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
              > Service <http://docs.yahoo.com/info/terms/> .
              >
              > [Non-text portions of this message have been removed]
              >
              > ------------------------ Yahoo! Groups Sponsor --------------------~-->
              > Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
              > Now with Pop-Up Blocker. Get it for free!
              > http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/D.ewlB/TM
              >
              >
              > --------------------------------------------------------------------~->
              >
              > To Post a message, send it to: batchworld@...
              >
              > To Unsubscribe, send a blank message to: batchworld-unsubscribe@...
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.