title: Download multiple files in queue with AFDownloadRequestOperation
body: <p>I'm using AFDownloadRequestOperation + AFNetworking to download and resume a list of files from a server. The code is working great at downloading and resuming multiple files at a time. But how to queue all operations inside an operations queue and execute the operation one by one?</p>
  
  <p>Here's my current code</p>
  
  <pre><code>// request the video file from server
  NSString *downloadURL = [NSString stringWithFormat:@"%@%@", [recipe download_url], [step valueForKey:@"video"]];
  
  NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:downloadURL]];
  AFDownloadRequestOperation *operation = [[AFDownloadRequestOperation alloc] initWithRequest:request targetPath:videoFile shouldResume:YES];
  
  // done saving!
  [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
       NSLog(@"Done downloading %@", videoFile);
  } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
       NSLog(@"Error: %ld", (long)[error code]);
  }];
  
  // set the progress
  [operation setProgressiveDownloadProgressBlock:^(AFDownloadRequestOperation *operation, NSInteger bytesRead, long long totalBytesRead, long long totalBytesExpected, long long totalBytesReadForFile, long long totalBytesExpectedToReadForFile) {
       float progress = ((float)totalBytesReadForFile) / totalBytesExpectedToReadForFile;
       [progressBar setProgress:progress];
  }];
  
  [operation start];
  </code></pre>