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

Author Topic: system cannot find specified file  (Read 16057 times)

0 Members and 1 Guest are viewing this topic.

Dias de verano

  • Guest
Re: system cannot find specified file
« Reply #15 on: July 22, 2008, 03:46:56 AM »
Well, you can take the ECHO out.

I just created a folder called c:\batch.files and I put 1 file in it called hope.txt and then I ran this

ren "c:\batch.files\hope.txt" o7-2008-.txt

and now I have 1 file in there called o7-2008-.txt

so there is nothing wrong with the code.

Check that folder & file names match exactly and are all as they should be.



carlrowley1

    Topic Starter


    Hopeful

  • liverpool fc
    Re: system cannot find specified file
    « Reply #16 on: July 22, 2008, 04:07:47 AM »
    Quote
    Check that folder & file names match exactly and are all as they should be.


    I have just tryied this i have a folder called c:\ batch.files with hope.txt  in it  but when i run it i have the same problem
    ren "c:\batch.files\hope.txt" o7-2008-.txt.........


    windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

    Laptop Toshiba.  L300/L300D series/windows vista home premium/
    2gb ram/32 bit/

    Windows 7 / home premium / 64 bit /3gb system ram /

    carlrowley1

      Topic Starter


      Hopeful

    • liverpool fc
      Re: system cannot find specified file
      « Reply #17 on: July 22, 2008, 04:35:15 AM »
      sorry dias got to rush

      i will try this again on thursday or if i can SEND YOU A PRIVATE MESSAGE  .

      CARN;T  figure out why i have these problems, as again i started with the example i copied, and thought that would work fine.

      the very first code i mentioned was the one in the example, i seem to have tryed everything , but got no where as usual ....but i try again on thursday

      just a recap

      i have a folder called batch.files which is in the directory c:\batch.files  and i have a txt file called hope.txt in there.........................thanks
      windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

      Laptop Toshiba.  L300/L300D series/windows vista home premium/
      2gb ram/32 bit/

      Windows 7 / home premium / 64 bit /3gb system ram /

      Dusty



        Egghead

      • I could if she would, but she won't so I don't.
      • Thanked: 75
      • Experience: Beginner
      • OS: Windows XP
      Re: system cannot find specified file
      « Reply #18 on: July 22, 2008, 02:45:30 PM »
      If this quote means what I think it means:
      Quote
      i have a folder called batch.files which is in the directory c:\batch.files  and i have a txt file called hope.txt in there
      then your path to hope.txt is not C:\batch.files\ but C:\batch.files\batch.files\ so you would have to ...ren c:\batch.files\batch.files\hope.txt...

      I have the impression that the file is not being found because it is not in the correct or specified path.

      Try a simple dir C:\hope.txt and dir C:\batch.files\hope.txt and dir C:\batch.files\batch.files\hope.txt to find out which path it is in.

      Edit:  Had another thought.  If your script has already been run and has worked then Hope.txt would have been renamed. look for a file with a date as the name.

      « Last Edit: July 23, 2008, 07:58:51 PM by Dusty »
      One good deed is worth more than a year of good intentions.

      carlrowley1

        Topic Starter


        Hopeful

      • liverpool fc
        Re: system cannot find specified file
        « Reply #19 on: July 24, 2008, 07:52:19 AM »



        Quote
        Try a simple dir C:\hope.txt and dir C:\batch.files\hope.txt and dir C:\batch.files\batch.files\hope.txt to find out which path it is in.

        this is what i tryed

        dir c:\hope.............file not found
        dir c:\batch.files\hope.txt......file not found
        dir c:\batch.files\batch.files\hope.txt......system cannot find file

        this is the latest one i have tryed but it still cannot find the file

        Quote
        [Posted by: Sidewinder  Posted on: July 21, 2008, 07:04:41 PM 
        Insert Quote 
        When defining your own delimiters, the space character is no longer the default. To add back the space, you need to define it as part of the delimiter pool.


        Code:
        @echo off
        for /f "tokens=1-4 delims=/ " %%d in ("%date%") do ren "hope.txt" %%e-%%f-%%g.txt


        FYI: %date% produces four parameters (ie: Mon 07/21/2008)

         
        /quote]







        windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

        Laptop Toshiba.  L300/L300D series/windows vista home premium/
        2gb ram/32 bit/

        Windows 7 / home premium / 64 bit /3gb system ram /

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: system cannot find specified file
        « Reply #20 on: July 24, 2008, 08:10:43 AM »
        Based on your post, this should work but apparently doesn't:

        Code: [Select]
        @echo off
        for /f "tokens=1-4 delims=/ " %%d in ("%date%") do ren "c:\batch.files\hope.txt" %%e-%%f-%%g.txt

        Why does hope.txt have zero bytes? Is hope.txt a hidden, system or read-only file?

         8)
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        carlrowley1

          Topic Starter


          Hopeful

        • liverpool fc
          Re: system cannot find specified file
          « Reply #21 on: July 24, 2008, 08:45:42 AM »
          Quote
          Why does hope.txt have zero bytes? Is hope.txt a hidden, system or read-only file?


          i ve just put a few line lines in  there

           i just created it for an example. so it carn't be a hidden , system file. or read only file
          just don't know why it carn;t find it... its puzzeling me...because it seems so simple the hope.txt is in the c:\batch.files directory
          windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

          Laptop Toshiba.  L300/L300D series/windows vista home premium/
          2gb ram/32 bit/

          Windows 7 / home premium / 64 bit /3gb system ram /

          carlrowley1

            Topic Starter


            Hopeful

          • liverpool fc
            Re: system cannot find specified file
            « Reply #22 on: July 24, 2008, 09:18:18 AM »
            quote from sidewinder


            Quote
            Based on your post, this should work but apparently doesn't:


            Code:
            @echo off
            for /f "tokens=1-4 delims=/ " %%d in ("%date%") do ren "c:\batch.files\hope.txt" %%e-%%f-%%g.txt


            sorry guys this is what i should have been putting    :-[

            @ echo off
            for /f "tokens=1-4 delims=/ " %%d in ("%date%") do ren "c:\batch.files\hope.txt.txt" %%e-%%f-%%g.txt
            pause

            had to add another .txt on the end, so sorry if i got you all confused...these things happen if you have just started learning........ :)   :-[
            windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

            Laptop Toshiba.  L300/L300D series/windows vista home premium/
            2gb ram/32 bit/

            Windows 7 / home premium / 64 bit /3gb system ram /

            Dias de verano

            • Guest
            Re: system cannot find specified file
            « Reply #23 on: July 24, 2008, 09:18:26 AM »
            hope.txt is in the c:\batch.files directory

            How do you know this?

            Sidewinder



              Guru

              Thanked: 139
            • Experience: Familiar
            • OS: Windows 10
            Re: system cannot find specified file
            « Reply #24 on: July 24, 2008, 09:23:43 AM »
            Quote
            had to add another .txt on the end, so sorry if i got you all confused...these things happen if you have just started learning........

            I'm a little slow on the uptake, so is the problem solved?

            Hopefully waiting   ;)
            The true sign of intelligence is not knowledge but imagination.

            -- Albert Einstein

            carlrowley1

              Topic Starter


              Hopeful

            • liverpool fc
              Re: system cannot find specified file
              « Reply #25 on: July 24, 2008, 09:26:39 AM »
              yes problem solved.........thanks everyone.....until the next time
              windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

              Laptop Toshiba.  L300/L300D series/windows vista home premium/
              2gb ram/32 bit/

              Windows 7 / home premium / 64 bit /3gb system ram /

              Dias de verano

              • Guest
              Re: system cannot find specified file
              « Reply #26 on: July 24, 2008, 09:40:51 AM »
              Quote
              had to add another .txt on the end, so sorry if i got you all confused...these things happen if you have just started learning........

              I'm a little slow on the uptake, so is the problem solved?

              Hopefully waiting   ;)

              Sidewinder, I doubt if carlrowley is going to answer that question, so perhaps I will have a stab.

              There never was a problem. Or rather, there was, but it was in front of the keyboard, not behind it. The OP stated that he could not rename a file called "hope.txt". Despite questions such as these he continued to maintain that this file existed and was located in a certain folder:

              Quote
              Check that folder & file names match exactly and are all as they should be.

              However, he finally stated that the file was actually called hope.txt.txt.

              One can speculate about the reasons for this, and I suspect that it may have something to do with hidden file extensions in Windows Explorer. Anyway, we all got royally led up the garden path.




              carlrowley1

                Topic Starter


                Hopeful

              • liverpool fc
                Re: system cannot find specified file
                « Reply #27 on: July 24, 2008, 10:12:48 AM »
                so basically if the file was just called "HOPE" it would have worked the first time because it automatically adds the .txt  , hope being a txt file


                so there was a file called "hope.txt" but the computer is adding another .txt on when searching for it....thus comeing back as file not found
                windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

                Laptop Toshiba.  L300/L300D series/windows vista home premium/
                2gb ram/32 bit/

                Windows 7 / home premium / 64 bit /3gb system ram /

                Dias de verano

                • Guest
                Re: system cannot find specified file
                « Reply #28 on: July 24, 2008, 10:17:49 AM »
                No. ""Basically" there was a file called hope.txt.txt. You seemed to think it was called hope.txt. The computer knew all along what it was called. It was you that didn't. You should uncheck "hide extensions for known file types" in Windows Explorer folder options to avoid any more "problems" like this one.
                « Last Edit: July 24, 2008, 10:58:00 AM by Dias de verano »

                carlrowley1

                  Topic Starter


                  Hopeful

                • liverpool fc
                  Re: system cannot find specified file
                  « Reply #29 on: July 24, 2008, 11:21:26 AM »
                  Quote
                  You should uncheck "hide extensions for known file types" in Windows Explorer folder options to avoid any more "problems" like this one.

                  thanks dias just done that,  works fine   :)
                  windowsXP professional sp3, Ram 512 , 1.30 gigahertz AMD Athlon, Maxtor 4r080L0 hard drive.

                  Laptop Toshiba.  L300/L300D series/windows vista home premium/
                  2gb ram/32 bit/

                  Windows 7 / home premium / 64 bit /3gb system ram /