Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:23:12+00:00 2026-05-28T15:23:12+00:00

i wrote a code that analyze a video file and then plot data on

  • 0

i wrote a code that analyze a video file and then plot data on a graph then
save this graph into
excel and jpg.

but my problem is that i have more than 200 video to analyze in around 20 folder,

so i need to automate this code to loop inside folders and analyze each *.avi file inside and

.. So any ideas or suggestions

Really appreciate your help

I need to know how to loop folders and get files inside and the apply a function to these files in that folder

Please note that my function that i also want to save graph result to img, should i then include full path while saving ? and how can i do it ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:23:13+00:00Added an answer on May 28, 2026 at 3:23 pm

    The dir and fullfile commands are what you need. Depending on your directory structure, something like this:

    video_dir = 'videos';
    
    % I'm not sure if there's a way to directly get a list of directories, but
    % this will work
    video_dir_children = dir(video_dir);
    video_subdirs = [];
    for ix = 1 : length(video_dir_children),
      % note we're careful to kick out '.' and '..' 
      %   (and any other directory starting with a '.')
      if(video_dir_children(ix).isdir && video_dir_children(ix).name(1) ~= '.')
        video_subdirs = [video_subdirs; video_dir_children(ix)];
      end
    end
    
    for ix = 1 : length(video_subdirs),
      this_dir = fullfile(video_dir, video_subdirs(ix).name);
      avi_files_in_this_dir = dir(fullfile(this_dir, '*.avi'));
    
      for jx = 1 : avi_files_in_this_dir,
        doVideoProcessing(fullfile(this_dir, avi_files_in_this_dir(jx).name));
      end
    
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I wrote buggy code that occasionally crash ... and creates a stackdump file.
I wrote VBA code that updates changes made in Excel to a database (SQL
I recently wrote some javascript code that filled a drop down list based on
I was thinking about a code that I wrote a few years ago in
I am testing some weird-looking CSS code that I wrote (I'm using a mix
I've got the following bit of code (that another developer wrote) that I need
I've got some code that lies in a browser, and wrote C++ plugins for
I wrote some code with a lot of recursion, that takes quite a bit
I wrote some naive code(in the sense that it's synchronous calls) for a tableview
My main solution is using code from a utility class library, that I wrote

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.