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

Author Topic: Moving files from multiple directories into one  (Read 4212 times)

0 Members and 1 Guest are viewing this topic.

WillT

    Topic Starter


    Greenhorn

    Moving files from multiple directories into one
    « on: March 11, 2009, 06:12:18 PM »
    I need to move flies from multiple directories into one

    Example:

    From

    Desktop\Java\lib\server.java
    Desktop\Java\lib\geometry.java
    Desktop\Java\lib\movement\axis.java
    Desktop\Java\lib\movement\debug.java
    Desktop\Java\lib\Models\1.java
    Desktop\Java\lib\Models\2.java

    To

    Desktop\Folder\

    What would be the best way to do this?


    WT


    BatchRocks



      Hopeful
    • Thanked: 3
      Re: Moving files from multiple directories into one
      « Reply #1 on: March 11, 2009, 06:44:50 PM »
      Code: [Select]
      move C:\<blah>\Java\lib\*.*
      C:\Desktop

      IN a rush, may or may not work.

      WillT

        Topic Starter


        Greenhorn

        Re: Moving files from multiple directories into one
        « Reply #2 on: March 11, 2009, 06:55:54 PM »
        incorrect Syntax

        But i want to strip the file from its folder and have only the files inside of the new folder

        BatchRocks



          Hopeful
        • Thanked: 3
          Re: Moving files from multiple directories into one
          « Reply #3 on: March 11, 2009, 07:00:18 PM »
          Did you seriously PUT <blah>?

          Computer Hope Admin

          • Administrator


          • Prodigy

            Thanked: 248
            • Yes
            • Yes
            • Yes
            • Computer Hope
          • Certifications: List
          • Computer: Specs
          • Experience: Guru
          • OS: Windows 10
          Re: Moving files from multiple directories into one
          « Reply #4 on: March 11, 2009, 07:01:21 PM »
          Do you want to do this from the command prompt?

          If you just want to do this, I'd suggest a real easy method of opening a search on the Desktop\Java\lib\ folder and then searching for the files you want to move. Once the results have returned cut and paste those into the Desktop\Folder\

          For example if you wanted all files do a search for *.* in the lib folder and cut all files found.

          If you need to do it from MS-DOS then you'd need to either right a batch file that does the move command or manually type the move command to move files from each directory that you want.

          Additional information on the move command at:
          http://www.computerhope.com/movehlp.htm

          Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
          -Albert Einstein

          WillT

            Topic Starter


            Greenhorn

            Re: Moving files from multiple directories into one
            « Reply #5 on: March 11, 2009, 07:09:11 PM »
            Yes i accually put <blah>

            Seriously? I would deserve to be banned from these forums I did


            And It doesn't have to be batch.
            I'm really using this to move files from zune so i can put them on a different mp3 player  ;D.
            « Last Edit: March 11, 2009, 07:44:01 PM by WillT »

            Woodman



              Beginner
              Re: Moving files from multiple directories into one
              « Reply #6 on: March 11, 2009, 08:53:57 PM »
              Move is a dangerous command to test with but here's a script using Copy which might be suitable.   Totally untested of course, leave that to you.  No allowance is made for folder/filenames containing spaces.

              Code: [Select]
              @echo off
              cls

              pushd desktop\java\lib\

              for /f %%A in ('dir /a-d/s/b') do (
                  copy %%A desktop\folder\ > nul
              )
              popd
               

              BatchRocks



                Hopeful
              • Thanked: 3
                Re: Moving files from multiple directories into one
                « Reply #7 on: March 12, 2009, 01:42:17 PM »
                Yes i accually put <blah>

                Seriously? I would deserve to be banned from these forums I did


                And It doesn't have to be batch.
                I'm really using this to move files from zune so i can put them on a different mp3 player  ;D.

                That is FAKE!

                Before he said, he wants to move it from Java\Lib and move it to his own folder for copyright fringing. I reported it when he said that, This is a cover up.

                WillT

                  Topic Starter


                  Greenhorn

                  Re: Moving files from multiple directories into one
                  « Reply #8 on: March 12, 2009, 02:54:39 PM »
                  That is FAKE!

                  Before he said, he wants to move it from Java\Lib and move it to his own folder for copyright fringing. I reported it when he said that, This is a cover up.


                  I payed 79 microsoft points for each of them how is that infringing?

                  BatchRocks



                    Hopeful
                  • Thanked: 3
                    Re: Moving files from multiple directories into one
                    « Reply #9 on: March 12, 2009, 02:55:35 PM »
                    You said "To get past their copyright".

                    WillT

                      Topic Starter


                      Greenhorn

                      Re: Moving files from multiple directories into one
                      « Reply #10 on: March 12, 2009, 03:04:49 PM »
                      If i pay money for a song and want to put in on another device thats perfectly legal

                      BatchRocks



                        Hopeful
                      • Thanked: 3
                        Re: Moving files from multiple directories into one
                        « Reply #11 on: March 12, 2009, 03:08:33 PM »
                        Depends.

                        WillT

                          Topic Starter


                          Greenhorn

                          Re: Moving files from multiple directories into one
                          « Reply #12 on: March 12, 2009, 03:16:23 PM »
                          On what?

                          First of all if I was stealing Microsoft wouldn't notice and I should try to get even with them anyways.

                          Ive had 2 xboxs that mircosoft refuse to fix the RRod on and I have purchased 3 windows xp home editions and 4 server editions. I'm sure me paying for songs then putting them on another mp3 players isn't a big deal.