Computing.Net > Forums > Programming > move files in batches

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

move files in batches

Reply to Message Icon

Name: TheNutz
Date: August 22, 2009 at 05:50:49 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hello,

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.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: ricardo647
Date: August 22, 2009 at 08:41:20 Pacific
Reply:

A recent posted message will settle your problem:
http://www.computing.net/answers/pr...

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


0

Response Number 2
Name: TheNutz
Date: August 22, 2009 at 08:48:58 Pacific
Reply:

thank you very much.


0

Response Number 3
Name: TheNutz
Date: August 22, 2009 at 08:54:28 Pacific
Reply:

it's not working :(
@echo off
pushd c:\Oldlocation
for %%j in (*.txt*) do if %%~jj move "%%j" "c:\newlocation"
popd


0

Response Number 4
Name: ricardo647
Date: August 22, 2009 at 19:53:13 Pacific
Reply:

Correct to:

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


0

Response Number 5
Name: TheNutz
Date: August 22, 2009 at 22:24:41 Pacific
Reply:

thank you. but it's not working with subfolders :(


0

Related Posts

See More



Response Number 6
Name: Sen Hu
Date: August 23, 2009 at 09:44:08 Pacific
Reply:

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 <> "")
do
    # Get the next file from the list.
    var str file ; lex "1" $list > $file
    # Move file to "C:\...\FONTS".
    system move ("\""+$file+"\"") ("\""+"C:\...\FONTS"+"\"")
done

Make sure you change "C:\...\FONTS" to the correct path everywhere in the script. Script is in biterscripting ( http://www.biterscripting.com ). 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.

Sen


0

Response Number 7
Name: TheNutz
Date: August 23, 2009 at 10:03:27 Pacific
Reply:

thank you.
i've discoverd xxcopy
http://www.xxcopy.com/

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

all my problems are gone :)

thank you guys


0

Sponsored Link
Ads by Google
Reply to Message Icon

start a file using a prog... can anyone help me with t...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: move files in batches

move file by date last modified in a batch www.computing.net/answers/programming/move-file-by-date-last-modified-in-a-batch/20173.html

Rename Files in Batch www.computing.net/answers/programming/rename-files-in-batch/11591.html

Header and trailer for csv file in batch www.computing.net/answers/programming/header-and-trailer-for-csv-file-in-batch/19462.html