Results 1 to 6 of 6

Thread: Batch file moving based on order!

  1. #1
    Join Date
    Apr 2007
    Location
    Toronto Canada
    Posts
    1,120

    Default Batch file moving based on order!

    Here is a scenario. I have a folder of 5000 bmp (or dxf or jpg or etc.) files names b0001.bmp (dxf etc.) to b5000.bmp. Is there a way to select every second file or every 3rd (or 4th and so on) file and move it to different folder. Anyone knows a progie that does it.

    Thanx.
    I hired an Italian guy to do my wires. Now they look like spaghetti!

  2. #2
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Cool

    You could write a custom script to do this, but it would be messy. A bit of googling suggests that this software with a script similar to this one might help. Take a look and see if it's what you're after.

    Another option might be Directory Opus. It supports regular expressions as part of it's advanced file renaming abilities. So you could re-name the files you want to move so that they include some unique string ("move_file", or something), and then select based on the presence of that string to do the move...

    Adam

  3. #3
    Join Date
    Dec 2007
    Location
    Nottingham, UK
    Posts
    2,845

    Default

    It's quite simple with a batch file.
    I do not have time at the moment to write a test a quick script but something along the lines of:
    Code:
    for /L %%a in (1,2,5000) do copy ...you get the idea...
    This will loop through adding two to the counter until it reaches 5000. If you want every 3rd file to move change the 2. Then pass this into a variable for the file name.

    If you can bear with me a few days, I'll try and find time to sort something if you get really stuck. But at least that's a start in the right direction.

    Dan


    P.S. You're TraceIT videos were very helpful. I guess this is for something along the same lines?
    So I owe you this script will get it done in a few day for you.
    - There is no such word as "can't" -
    - 60% of the time it works every time -

  4. #4
    Join Date
    Apr 2007
    Location
    Toronto Canada
    Posts
    1,120

    Default

    Duuuuuhhhh... I feel very stupid now. I embarrassed myself publicly.

    @echo off
    del *1.*
    del *3.*
    del *5.*
    del *7.*
    del *9.*
    @echo on

    @echo off
    move *1.* z:\part2
    move *3.* z:\part2
    move *5.* z:\part2
    move *7.* z:\part2
    move *9.* z:\part2
    @echo on
    Last edited by Dr Laser; 03-15-2010 at 12:52.
    I hired an Italian guy to do my wires. Now they look like spaghetti!

  5. #5
    Join Date
    Dec 2007
    Location
    Nottingham, UK
    Posts
    2,845

    Default

    Ah! Brill - nice and simple
    I like that better than the loop.

    Glad you got it sorted...
    - There is no such word as "can't" -
    - 60% of the time it works every time -

  6. #6
    Join Date
    Dec 2014
    Posts
    1

    Default

    Ok thanks guys, much appreciated.
    You can get score highest marks in SK0-003 braindumps dumps exam using Test king and test king which are prepared by ku certified professionals www.berklee.edu ccna wireless Northwestern University both are marvelous in Sterling College

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •