Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 07-11-2007, 12:10 PM
mikeita@gmail.com
Newsgroup Contributor
 
Posts: n/a
File Copy Utility

Does anyone know of a utility that will copy a specified number of
files from a source folder to a target folder. I have an application
that can only handle processing 500 files at a time. I have 220,000
files that need processing. I would like to schedule the next 500 to
be copied to the target when 500 complete. I have hunted around for
all the regular applications (Robocopy, xcopy, xxcopy etc) but none
have the ability to copy just any 500 files at a time. Is there a
better way to throttle these files 500 at a time from the source to
target??

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 07-11-2007, 12:10 PM
  #2 (permalink)  
Old 07-11-2007, 01:10 PM
Jon Scott
Newsgroup Contributor
 
Posts: n/a
Re: File Copy Utility

<mikeita******.com> wrote...
> Does anyone know of a utility that will copy a specified number of
> files from a source folder to a target folder. I have an application
> that can only handle processing 500 files at a time. I have 220,000
> files that need processing. I would like to schedule the next 500 to
> be copied to the target when 500 complete. I have hunted around for
> all the regular applications (Robocopy, xcopy, xxcopy etc) but none
> have the ability to copy just any 500 files at a time. Is there a
> better way to throttle these files 500 at a time from the source to
> target??


The good ol' MOVE in XP works fine. I wrote up a couple of test batch files
that do what you want.

MoveXFiles.bat :

set /a moveindex=0
for %%f in ("C:\Temp\Test\*.txt") do call MoveOneFile.bat "%%f"

MoveOneFile.bat :

if %moveindex%==500 goto End
move /y %1 "C:\Temp\Test\Test2"
set moveindex
set /a moveindex=%moveindex%+1
:End



What the above will do is move up to 500 txt files from C:\Temp\Test to
C:\Temp\Test\Test2. Just replace the appropriate paths to suit your needs
and execute MoveXFiles.bat. While this isn't a "copy", but rather a "move",
this prevents re-copying over an already copied file.

--
Thanks,
Jon E. Scott
Blue Orb Software
http://www.blueorbsoft.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 07-11-2007, 01:50 PM
Jon Scott
Newsgroup Contributor
 
Posts: n/a
Re: File Copy Utility

> MoveOneFile.bat :
>
> if %moveindex%==500 goto End
> move /y %1 "C:\Temp\Test\Test2"
> set moveindex
> set /a moveindex=%moveindex%+1
> :End



Actually, the above should be:

MoveOneFile.bat :

if %moveindex%==20 goto End
move /y %1 "C:\Temp\Test\Test2"
set /a moveindex=%moveindex%+1
:End

--
Thanks,
Jon E. Scott
Blue Orb Software
http://www.blueorbsoft.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 07-12-2007, 07:00 AM
mikeita@gmail.com
Newsgroup Contributor
 
Posts: n/a
Re: File Copy Utility

On Jul 11, 4:47 pm, "Jon Scott" <nos...@server.com> wrote:
> > MoveOneFile.bat :

>
> > if %moveindex%==500 goto End
> > move /y %1 "C:\Temp\Test\Test2"
> > set moveindex
> > set /a moveindex=%moveindex%+1
> > :End

>
> Actually, the above should be:
>
> MoveOneFile.bat :
>
> if %moveindex%==20 goto End
> move /y %1 "C:\Temp\Test\Test2"
> set /a moveindex=%moveindex%+1
> :End
>
> --
> Thanks,
> Jon E. Scott
> Blue Orb Softwarehttp://www.blueorbsoft.com




Thanks much for the response it worked great!!


Mike

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 07-12-2007, 12:20 PM
Jon Scott
Newsgroup Contributor
 
Posts: n/a
Re: File Copy Utility

<mikeita******.com> wrote...
>> MoveOneFile.bat :
>>
>> if %moveindex%==20 goto End
>> move /y %1 "C:\Temp\Test\Test2"
>> set /a moveindex=%moveindex%+1
>> :End

>
> Thanks much for the response it worked great!!



You're welcome. I should start checking my work more when I copy/paste into
OE. That 20 should read 500.

--
Thanks,
Jon E. Scott
Blue Orb Software
http://www.blueorbsoft.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Utility - to Multiple Drives? Talal Itani Windows XP 1 06-22-2007 05:50 PM
Scanner copy Utility crashman2u Windows XP 1 05-05-2007 03:33 PM
Copy a file with Windows Explorer reserves the file size in advanc Calin Iaru Windows XP 2 03-09-2007 12:15 AM
Best (free) utility to copy files to sd card in ppc? EGMono Pocket PC General 5 01-15-2007 10:48 AM
Re: File Wiping Utility Tom Windows XP 4 01-04-2007 02:49 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:35 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0