Jump to content

File Copy Utility


Recommended Posts

Guest mikeita@gmail.com
Posted

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??

  • Replies 4
  • Created
  • Last Reply
Guest Jon Scott
Posted

Re: File Copy Utility

 

<mikeita@gmail.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

Guest Jon Scott
Posted

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

Guest mikeita@gmail.com
Posted

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

Guest Jon Scott
Posted

Re: File Copy Utility

 

<mikeita@gmail.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


×
×
  • Create New...