move files in batches

August 22, 2009 at 05:50:49
Specs: Windows XP

I'm hoping someone can help me with a problem. I need to have a batchfile witch can move all my fonts from their folders into one folder.

ex: in folder FONTS i have the folder fontname1, fontname2... fontnameX, and i want to move the files from every fontname folders (1,2..x) into one folder.


See More: move files in batches

Report •

August 22, 2009 at 08:41:20
A recent posted message will settle your problem:

See IVO┬┤s post. You only has to eliminate size comparison and change %%~zj to %%jj.

Report •

August 22, 2009 at 08:48:58
thank you very much.

Report •

August 22, 2009 at 08:54:28
it's not working :(
@echo off
pushd c:\Oldlocation
for %%j in (*.txt*) do if %%~jj move "%%j" "c:\newlocation"

Report •

Related Solutions

August 22, 2009 at 19:53:13
Correct to:

@echo off
for %%j in (*.txt) do move "%%j" "c:\newlocation"

Report •

August 22, 2009 at 22:24:41
thank you. but it's not working with subfolders :(

Report •

August 23, 2009 at 09:44:08

You want to move all files from C:\....\FONTS\fontname1, C:\....\FONTS\fontname2, C:\....\FONTS\fontnamex to C:\...\FONTS ? Here is a script.

# Script movefonts.txt
# Collect list of files.
var str list ; lf -n "*" "C:\...\FONTS" ($ftype=="f") > $list
while ($list <> "")
    # Get the next file from the list.
    var str file ; lex "1" $list > $file
    # Move file to "C:\...\FONTS".
    system move ("\""+$file+"\"") ("\""+"C:\...\FONTS"+"\"")

Make sure you change "C:\...\FONTS" to the correct path everywhere in the script. Script is in biterscripting ( ). Save the script as C:\Scripts\movefonts.txt, start biterscripting, enter the following command.

script movefonts.txt

Test the script first. I have not tested it.


Report •

August 23, 2009 at 10:03:27
thank you.
i've discoverd xxcopy

and with this line:
xxcopy c:\old c:\new /sl

all my problems are gone :)

thank you guys

Report •

Ask Question