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

path ?

Expand Messages
  • n9mfk9
    hi all were this line reads dir can i put the path there like c: test test /f tokens=* delims= %%a in ( dir /b/a:A NOAA*.txt thanks
    Message 1 of 10 , Sep 2, 2011
    • 0 Attachment
      hi all
      were this line reads dir can i put the path there like c:\test\test
      /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
      thanks
    • foxidrive
      ... This puts the current directory in there, but it s just the same as echo %cd% @echo off for /f delims= %%a in ( %cd% ) do echo %%a What do you need to
      Message 2 of 10 , Sep 2, 2011
      • 0 Attachment
        On 3/09/2011 00:15, n9mfk9 wrote:
        > hi all
        > were this line reads dir can i put the path there like c:\test\test
        > /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
        > thanks



        This puts the current directory in there, but it's just the same as echo %cd%

        @echo off
        for /f "delims=" %%a in ("%cd%") do echo %%a



        What do you need to do?

        Maybe this is what you mean?


        @echo off
        for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo %%a
      • n9mfk9
        hi procyon50 , the way it works with /f tokens=* delims= %%a in ( dir /b/a:A NOAA*.txt is i have to run it in the c: test test were the txt file is but i
        Message 3 of 10 , Sep 2, 2011
        • 0 Attachment
          hi procyon50 ,
          the way it works with /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
          is i have to run it in the c:\test\test were the txt file is but i went to run the bat form c:\
          so how do i change that line so it knows the file it look for is in c:\test\test\
          beau

          --- In batchworld@yahoogroups.com, foxidrive <foxidrive@...> wrote:
          >
          > On 3/09/2011 00:15, n9mfk9 wrote:
          > > hi all
          > > were this line reads dir can i put the path there like c:\test\test
          > > /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
          > > thanks
          >
          >
          >
          > This puts the current directory in there, but it's just the same as echo %cd%
          >
          > @echo off
          > for /f "delims=" %%a in ("%cd%") do echo %%a
          >
          >
          >
          > What do you need to do?
          >
          > Maybe this is what you mean?
          >
          >
          > @echo off
          > for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo %%a
          >
        • foxidrive
          ... Did you try the bottom version?
          Message 4 of 10 , Sep 2, 2011
          • 0 Attachment
            On 3/09/2011 12:43, n9mfk9 wrote:
            > hi procyon50 ,
            > the way it works with /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
            > is i have to run it in the c:\test\test were the txt file is but i went to run the bat form c:\
            > so how do i change that line so it knows the file it look for is in c:\test\test\
            > beau
            >
            > --- In batchworld@yahoogroups.com, foxidrive<foxidrive@...> wrote:
            >>
            >> On 3/09/2011 00:15, n9mfk9 wrote:
            >>> hi all
            >>> were this line reads dir can i put the path there like c:\test\test
            >>> /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
            >>> thanks
            >>
            >>
            >>
            >> This puts the current directory in there, but it's just the same as echo %cd%
            >>
            >> @echo off
            >> for /f "delims=" %%a in ("%cd%") do echo %%a
            >>
            >>
            >>
            >> What do you need to do?
            >>
            >> Maybe this is what you mean?
            >>
            >>
            >> @echo off
            >> for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo %%a

            Did you try the bottom version?
          • n9mfk9
            with for /f tokens=* delims= %%a in ( dir c: cumulus Reports NOAA*.txt /b/a:A ) do echo put %%~a temp.ftp i got file not found
            Message 5 of 10 , Sep 3, 2011
            • 0 Attachment
              with for /f "tokens=* delims= " %%a in ('dir "c:\cumulus\Reports\NOAA*.txt" /b/a:A') do echo put %%~a >> temp.ftp
              i got file not found
              --- In batchworld@yahoogroups.com, foxidrive <foxidrive@...> wrote:
              >
              > On 3/09/2011 12:43, n9mfk9 wrote:
              > > hi procyon50 ,
              > > the way it works with /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
              > > is i have to run it in the c:\test\test were the txt file is but i went to run the bat form c:\
              > > so how do i change that line so it knows the file it look for is in c:\test\test\
              > > beau
              > >
              > > --- In batchworld@yahoogroups.com, foxidrive<foxidrive@> wrote:
              > >>
              > >> On 3/09/2011 00:15, n9mfk9 wrote:
              > >>> hi all
              > >>> were this line reads dir can i put the path there like c:\test\test
              > >>> /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
              > >>> thanks
              > >>
              > >>
              > >>
              > >> This puts the current directory in there, but it's just the same as echo %cd%
              > >>
              > >> @echo off
              > >> for /f "delims=" %%a in ("%cd%") do echo %%a
              > >>
              > >>
              > >>
              > >> What do you need to do?
              > >>
              > >> Maybe this is what you mean?
              > >>
              > >>
              > >> @echo off
              > >> for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo %%a
              >
              > Did you try the bottom version?
              >
            • foxidrive
              Hmmmm... That is not the code I provided. Your issue is probably that they don t have the archive attribute set, if the files exist.
              Message 6 of 10 , Sep 3, 2011
              • 0 Attachment
                Hmmmm... That is not the code I provided.

                Your issue is probably that they don't have the archive attribute set, if the files exist.


                On 4/09/2011 01:20, n9mfk9 wrote:
                >
                > with for /f "tokens=* delims= " %%a in ('dir "c:\cumulus\Reports\NOAA*.txt" /b/a:A') do echo put %%~a>> temp.ftp
                > i got file not found
                > --- In batchworld@yahoogroups.com, foxidrive<foxidrive@...> wrote:
                >>
                >> On 3/09/2011 12:43, n9mfk9 wrote:
                >>> hi procyon50 ,
                >>> the way it works with /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
                >>> is i have to run it in the c:\test\test were the txt file is but i went to run the bat form c:\
                >>> so how do i change that line so it knows the file it look for is in c:\test\test\
                >>> beau
                >>>
                >>> --- In batchworld@yahoogroups.com, foxidrive<foxidrive@> wrote:
                >>>>
                >>>> On 3/09/2011 00:15, n9mfk9 wrote:
                >>>>> hi all
                >>>>> were this line reads dir can i put the path there like c:\test\test
                >>>>> /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
                >>>>> thanks
                >>>>
                >>>>
                >>>>
                >>>> This puts the current directory in there, but it's just the same as echo %cd%
                >>>>
                >>>> @echo off
                >>>> for /f "delims=" %%a in ("%cd%") do echo %%a
                >>>>
                >>>>
                >>>>
                >>>> What do you need to do?
                >>>>
                >>>> Maybe this is what you mean?
                >>>>
                >>>>
                >>>> @echo off
                >>>> for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo %%a
                >>
                >> Did you try the bottom version?
              • Theodorik OBroin
                What do you get if you just type: dir c: cumulus reports NOAA*.txt and also: attrib c: cumulus reports NOAA*.txt ? (Sounds like you may not have the archive
                Message 7 of 10 , Sep 3, 2011
                • 0 Attachment
                  What do you get if you just type:

                  dir c:\cumulus\reports\NOAA*.txt

                  and also:

                  attrib c:\cumulus\reports\NOAA*.txt

                  ?
                  (Sounds like you may not have the archive bit set on those files).


                  On 3 September 2011 17:20, n9mfk9 <n9mfk@...> wrote:

                  > **
                  >
                  >
                  >
                  > with for /f "tokens=* delims= " %%a in ('dir "c:\cumulus\Reports\NOAA*.txt"
                  > /b/a:A') do echo put %%~a >> temp.ftp
                  > i got file not found
                  > --- In batchworld@yahoogroups.com, foxidrive <foxidrive@...> wrote:
                  > >
                  > > On 3/09/2011 12:43, n9mfk9 wrote:
                  > > > hi procyon50 ,
                  > > > the way it works with /f "tokens=* delims= " %%a in ('dir /b/a:A
                  > NOAA*.txt
                  > > > is i have to run it in the c:\t
                  >



                  > est\test were the txt file is but i went to run the bat form c:\
                  > > > so how do i change that line so it knows the file it look for is in
                  > c:\test\test\
                  > > > beau
                  > > >
                  > > > --- In batchworld@yahoogroups.com, foxidrive<foxidrive@> wrote:
                  > > >>
                  > > >> On 3/09/2011 00:15, n9mfk9 wrote:
                  > > >>> hi all
                  > > >>> were this line reads dir can i put the path there like c:\test\test
                  > > >>> /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt
                  > > >>> thanks
                  > > >>
                  > > >>
                  > > >>
                  > > >> This puts the current directory in there, but it's just the same as
                  > echo %cd%
                  > > >>
                  > > >> @echo off
                  > > >> for /f "delims=" %%a in ("%cd%") do echo %%a
                  > > >>
                  > > >>
                  > > >>
                  > > >> What do you need to do?
                  > > >>
                  > > >> Maybe this is what you mean?
                  > > >>
                  > > >>
                  > > >> @echo off
                  > > >> for /f "delims=" %%a in ('dir "c:\test\test\*.txt" /b /a-d') do echo
                  > %%a
                  > >
                  > > Did you try the bottom version?
                  > >
                  >
                  >
                  >



                  --

                  There are only 10 types of people in the world.
                  Those who understand binary,
                  and those who don't.


                  [Non-text portions of this message have been removed]
                • n9mfk9
                  Here is the hole script @echo off echo open yourwebsite.com temp.ftp echo yourFtpUserName temp.ftp echo yourFtpPassword temp.ftp echo cd
                  Message 8 of 10 , Sep 3, 2011
                  • 0 Attachment
                    Here is the hole script

                    @echo off
                    echo open yourwebsite.com > temp.ftp
                    echo yourFtpUserName >> temp.ftp
                    echo yourFtpPassword >> temp.ftp
                    echo cd yourWebPath/NOAA-reports >> temp.ftp
                    for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put %%~a >> temp.ftp
                    ftps -a -s:temp.ftp
                    del temp.ftp
                    attrib -R NOAA*.txt

                    if i run this from were the txt file are it ok
                    i went to change it so it will run from c: an be able to find the file in c:\test\test
                  • foxidrive
                    ... pushd c: test test ... popd ... Add the two lines above - that is one way to set the source folder.
                    Message 9 of 10 , Sep 3, 2011
                    • 0 Attachment
                      On 4/09/2011 05:08, n9mfk9 wrote:
                      > Here is the hole script
                      >
                      > @echo off

                      pushd "c:\test\test"

                      > echo open yourwebsite.com> temp.ftp
                      > echo yourFtpUserName>> temp.ftp
                      > echo yourFtpPassword>> temp.ftp
                      > echo cd yourWebPath/NOAA-reports>> temp.ftp
                      > for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put %%~a>> temp.ftp
                      > ftps -a -s:temp.ftp
                      > del temp.ftp
                      > attrib -R NOAA*.txt

                      popd

                      > if i run this from were the txt file are it ok
                      > i went to change it so it will run from c: an be able to find the file in c:\test\test


                      Add the two lines above - that is one way to set the source folder.
                    • Theodorik OBroin
                      Cheers Foxi ;o) Was going to say something similar ... -- There are only 10 types of people in the world. Those who understand binary, and those who don t.
                      Message 10 of 10 , Sep 3, 2011
                      • 0 Attachment
                        Cheers Foxi ;o)
                        Was going to say something similar

                        On 3 September 2011 21:21, foxidrive <foxidrive@...> wrote:

                        > **
                        >
                        >
                        > On 4/09/2011 05:08, n9mfk9 wrote:
                        > > Here is the hole script
                        > >
                        > > @echo off
                        >
                        > pushd "c:\test\test"
                        >
                        >
                        > > echo open yourwebsite.com> temp.ftp
                        > > echo yourFtpUserName>> temp.ftp
                        > > echo yourFtpPassword>> temp.ftp
                        > > echo cd yourWebPath/NOAA-reports>> temp.ftp
                        > > for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put
                        > %%~a>> temp.ftp
                        > > ftps -a -s:temp.ftp
                        > > del temp.ftp
                        > > attrib -R NOAA*.txt
                        >
                        > popd
                        >
                        >
                        > > if i run this from were the txt file are it ok
                        > > i went to change it so it will run from c: an be able to find the file in
                        > c:\test\test
                        >
                        > Add the two lines above - that is one way to set the source folder.
                        >
                        >
                        >



                        --

                        There are only 10 types of people in the world.
                        Those who understand binary,
                        and those who don't.


                        [Non-text portions of this message have been removed]
                      Your message has been successfully submitted and would be delivered to recipients shortly.