Computer Hope

Microsoft => Microsoft DOS => Topic started by: WillT on March 11, 2009, 06:12:18 PM

Title: Moving files from multiple directories into one
Post by: WillT 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

Title: Re: Moving files from multiple directories into one
Post by: BatchRocks 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.
Title: Re: Moving files from multiple directories into one
Post by: WillT 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
Title: Re: Moving files from multiple directories into one
Post by: BatchRocks on March 11, 2009, 07:00:18 PM
Did you seriously PUT <blah>?
Title: Re: Moving files from multiple directories into one
Post by: Computer Hope Admin 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

Title: Re: Moving files from multiple directories into one
Post by: WillT 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.
Title: Re: Moving files from multiple directories into one
Post by: Woodman 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
 
Title: Re: Moving files from multiple directories into one
Post by: BatchRocks 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.
Title: Re: Moving files from multiple directories into one
Post by: WillT 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?
Title: Re: Moving files from multiple directories into one
Post by: BatchRocks on March 12, 2009, 02:55:35 PM
You said "To get past their copyright".
Title: Re: Moving files from multiple directories into one
Post by: WillT 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
Title: Re: Moving files from multiple directories into one
Post by: BatchRocks on March 12, 2009, 03:08:33 PM
Depends.
Title: Re: Moving files from multiple directories into one
Post by: WillT 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.