Importing All Files in a Folder in a Macro Instruction

In the list of commands in a macro instruction, the command Import2 is designed to import a single specified file. Is it possible to import all files within a certain folder?
Untitled.png

For batch processing the files in a folder?

Please clarify. Do you wish to open multiple files with Audacity?

Yes, I need to load multiple files in a specified folder in order to batch process them. I want this to be saved as a macro instruction for future use whenever I put audio files in that folder for processing.

If the files are common formats, Audacity supports multiple DRAG & DROP.
Another way is use the OPEN or IMPORT dialogue route.

  1. OPEN or IMPORT will open a dialogue box.
  2. Navigate to your chosen folder.
  3. Highlight files to be opened.
  4. You will see the file names appear in FILE NAME box lower down.
  5. When done - click OPEN in the dialogue box.
    Files should now be opened in Audacity.

Be aware, working on multiple files will take up a lot of CPU cycles and memory. Shut down any programs that are not needed. Particularly internet browsers.

For batch processing, you don’t need to use an “Import” command. You need to apply the macro to “Files”. See: https://manual.audacityteam.org/man/apply_macro.html

Thank you for the instructions. The reason why I need to add multiple files to a project is because I am trying to create a macro instruction which does the following:

  1. Import files in a specified folder into the project.
  2. Align the imported tracks end to end.
  3. Create labels at the beginning of each track. Each label should bear the name of the imported track.
  4. Import one more file into the project and multiply the track until the length of the track is no less than the total length of all the tracks above.
  5. Truncate the track to remove the redundant audio (which goes beyond the audio of the tracks above), as shown in the picture below.
  6. Mix and render all the tracks, and export multiple audio segments based on the labels.
    I do not know whether the above can be accomplished with the use of batch processing (because I need to multiply the audio of one of the tracks and then to truncate it based on the total length of the tracks above it). If this is not possible in batch processing, do you know how to execute the above commands on multiple files?
    Untitled.png

No, that’s too complex for Audacity’s macros.
I think your options are:

  • Do it manually
  • Learn how to write Nyquist Macros
  • Find another approach


What is that file?

What is that file?

It is a file with some background sound which is to be mixed with the tracks above.

What sort of sound? Is it something that can be looped? Does it matter where it starts / ends?

If it’s something like the sound of the sea, or wind through trees, then you could batch process your files in sequence, using the “Import2” command to load the background sound - you just need to ensure that your background sound is at least as long as the longest file that you want to process. Use Macro commands to trim the background sound to the same length as the file that is being batch processed.

What sort of sound? Is it something that can be looped? Does it matter where it starts / ends?
If it’s something like the sound of the sea, or wind through trees, then you could batch process your files in sequence, using the “Import2” command to load the background sound - you just need to ensure that your background sound is at least as long as the longest file that you want to process. Use Macro commands to trim the background sound to the same length as the file that is being batch processed.

Thank you.
It is a background melody, and it can be looped, but it matters where it starts and ends.
English is not my native language, but I will try to say what I mean. If each file is mixed with the background melody separately, the melody will start at the same point with each file, whereas if all the files are loaded into the project, the melody will not be interrupted each time at the start of each of the tracks. That is why I am interested to know whether it is possible to automatically load all of the files, repeat the background melody, trim the melody, mix all of the audio into one track, and export the audio based on labels put at the beginning of each of the aligned tracks.

Not possible with a normal macro.