Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: looping through files in a given directory  (Read 3879 times)

0 Members and 1 Guest are viewing this topic.

thenomad

    Topic Starter


    Starter

    looping through files in a given directory
    « on: October 07, 2008, 09:38:23 PM »
    OS : Win XP pro
    Problem : file concatenation using filename indexes

    Some idiot chopped up an mp3 file into 99 pieces of all less than 1 minute long chunks. filenames are track## where ## is ranging between 01 and 99. What I am trying to accomplish is:

    for i=1 to 99 step 5
    for j=i+1 to i+4
      copy track(j)+track(j+1)+track(j+2)+track(j+3)+track(j+4)  supertrack(j)
    continue
    continue

    I know this code is neither basic nor DOS but I am not proficient in either of these, so goes my question. Is there anyway that I can accomplish this using the command window running under WinXP pro ? If not, what would be a good basic code and where can I get my hands on a copy (freeware) of basic interpreter ?

    Thanks for all your help.


    diablo416



      Hopeful
      Re: looping through files in a given directory
      « Reply #1 on: October 07, 2008, 09:47:07 PM »

      maybe try
      type *.mp3 >>file.mp3

      thenomad

        Topic Starter


        Starter

        Re: looping through files in a given directory
        « Reply #2 on: October 07, 2008, 10:29:30 PM »

        maybe try
        type *.mp3 >>file.mp3

        if only it were so easy. I do not want to put all files back together. I like to add 5 small parts to make larger part but still want to have the original file divided into 20 pieces instead of 100 pieces.

        I uploaded one directory to my linux webhost where I happen to have shell access, and cobbled up a script in less than 30 minutes to accomplish that. Looking for a DOS/Command only solution to save me the trouble of uploading and downloading files.