Difference between revisions of "File manager context menus"

From Audacity Wiki
Jump to: navigation, search
(Minor tidy)
m (Text replace - "http://forum.audacityteam.org" to "https://forum.audacityteam.org")
 
(60 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Loss of audio in Project due to missing dependent file==  
+
== Context menus ==  
  
 +
A [http://en.wikipedia.org/wiki/Context_menu context menu] is the menu of options accessible when you right-click over a file in the operating system's file manager (for example, Explorer in Windows). The following information applies to Windows, but similar principles apply to other operating systems.   
  
'''1.2.x and 1.3.0/1.3.1 (Beta) versions of Audacity.'''
+
=== Open with ===
  
By default, Audacity imports uncompressed files such as .WAV or AIFF by reading them directly from the file. This is normal practice with media editors and both speeds up the import considerably and avoids the rapid consumption of disc space that copying the file would involve. However, this means that you '''need to keep the imported .WAV or AIFF file available''' for Audacity to use in the exact file path it existed in when you imported it.  
+
This context menu item allows you to open the file with applications other than the default application associated with that file type. You can add an application to the "Open with" menu and choose if that application will now be the default application to open that file type when you double-click it.  
  
If you do '''''any''''' of these:
+
Once a application has been added to the "Open with" menu, it will be listed when you hover over "Open with". If you add Audacity to "Open with", this provides a way to open files with Audacity when it isn't already running, but retain the default double-click action to play the file with Windows Media Player. If a track is already open in Audacity when you execute "Open with", your file will be opened in a new project window. 
 +
<div id="win_open_with">
 +
{{advice|1='''On Windows, the Audacity executable cannot be added to Explorer's "Open with" menu if there is already a [http://en.wikipedia.org/wiki/Windows_Registry Registry] entry pointing to another "audacity.exe".'''  This is a Windows limitation. It could arise when you update from legacy Audacity 1.3.x (which had its own installation folder) to [https://web.audacityteam.org/download/windows current Audacity]. Try any of the following workarounds.
 +
* Use the {{menu|Open with}} dialog to browse to the required executable each time.
 +
* Rename one executable to a unique name such as "audacity_2.exe", then use {{menu|Open with > Choose default application...}}, browse to the renamed executable then enable  "Always use the selected app to open this kind of file".
 +
** ''If you update Audacity again, you must rename the new audacity.exe to the same name you used before, or add a new association to the new executable renamed to another name''.
 +
* Download and run this [https://forum.audacityteam.org/download/file.php?id=5279 registry file] as administrator. Rename it to "AudacityAssociationCleaner.reg" (without quotes) before running it.
 +
* Install [http://www.piriform.com/ccleaner/download CCleaner] and run its Registry cleaner as administrator. }}</div>
  
* move the file to another location
+
<div id="context_custom"></div>
* delete it
+
=== Custom context menus ===
* rename it
 
* do not make accessible the removable source it resides on
 
  
you will find your Project will have either no sound, or sound only in places, even though you can see the waveform on the screen. If there is sound in any of the Project, this will be only in those sections where you edited the Project while the original audio was in place. Where you did this, Audacity saved that edited data in the Project folder.
+
To give more direct context menu access to Audacity, Windows lets you add a custom context menu item of your own for a file type, such as "Edit WAV in Audacity".    
  
If you are in this situation, simply open the .aup Project file in a text editor such as Notepad. The file(s) that you originally used to read data into the project are marked in the .aup file as "aliasfile". Use the text editor's "Find" function to search for "aliasfile" (without quotes), and note the full path to these files that is noted in the .aup file e.g. {{path|1=aliasfile='C:\My Music\Music22.wav'}}
+
To create a custom context menu item in '''Windows 98, ME, 2000 or XP:'''  
  
If you can restore the files noted as aliasfiles to the exact path noted in the .aup file, the Project will have full sound again.
+
# Click {{menu|Windows Start button > (Settings) > Control Panel > Folder Options}}, or {{menu|Tools > Folder Options}} from inside Explorer   
 
+
# Click on the {{menu|File Types tab}}
To avoid this problem in future when importing uncompressed files, either retain the original audio file (in its correct location) or set Audacity to make a copy of the file, which will then be stored in the Project's _data folder when the Project is saved. Set Audacity to make a copy of the imported file by going to the {{menu|Preferences > File Formats tab > "when importing uncompressed audio...." section}} and check the radio button {{menu|"make a copy of the file before editing (safer)"}}.
+
# Navigate to the file extension for your context menu item, such as WAV, and click "Advanced"  
 
+
# In the window that appears, click "New" to add a new context menu item (or to change an existing item, click "Edit")
:'''Note:''' this issue does not arise if importing compressed data such as an .MP3 or .OGG file, as Audacity automatically makes a copy upon import.
+
# In the "Action" box, type or change the entry as you wish it to appear in the menu (for example, ''Edit WAV in Audacity'')
 
+
# In the "Application used to perform action" box, type the full path to the Audacity executable inside quotes, followed by %1 inside quotes, for example:<br>{{path|"C:\Program Files\Audacity 2.0.0 (Unicode)\audacity.exe" "%1"}}
 
 
'''1.3.2 and later Beta versions of Audacity'''
 
 
 
In Beta versions '''1.3.2 onwards''', Audacity by default will show a dialogue every time you save a Project if it's dependent on other audio files, and give you the option of copying them into the Project so that it's self-contained. The dialogue also gives you the option to always copy data into the Project, never do so, or always ask what to do. These three options can also be accessed on the {{menu|Preferences > File Formats tab}} exactly as in 1.2.x.
 
 
 
 
 
==Directory write-protected or disk full error when writing WAV/AIFF==
 
 
 
This tip applies to '''1.2.x''' and '''1.3.0/1.3.1''' versions of Audacity.
 
 
 
You will receive the above error if you both:
 
 
 
* when importing uncompressed audio data such as a .WAV or .AIFF file, use Audacity's default behaviour of reading the data directly from the original file, '''''and'''''
 
* export your Project's audio data to the same file name and directory as the file you imported
 
 
 
The problem occurs because Audacity cannot delete the original file in order to overwrite it when it is already reading it. (This issue does not arise if importing a compressed audio file such as an .MP3 file, because in the case of compressed audio Audacity automatically makes a copy upon import.)
 
 
 
To avoid this problem in 1.2.6, either
 
 
 
* save your exported .WAV or .AIFF to another file name or another directory, or
 
* set Audacity to make a copy of the imported file. You do this on the {{menu|Preferences > File Formats tab > "when importing uncompressed audio...." section}} and check the radio button {{menu|"make a copy of the file before editing (safer)"}}. <span style="color:green; font-size:88%">'''HINT:''' You need to exit and restart Audacity before this Preference change takes effect.</span> 
 
 
 
 
 
In 1.3.2 and later Beta versions of Audacity, this problem is handled differently, and you do not need to take the steps necessary in 1.2.6 as above. If you have Audacity set to make a copy of the original file, you can overwrite the original file just as in 1.2.6. If you have Audacity set to read directly from the original file, it will rename the original file by appending "-old1" to its filename, allowing you to export the edited audio as the original filename. Once you are happy with the newly exported file, simply delete the original file with the "-old1" suffix.
 
 
 
 
 
==Error importing file with spaces in filename from right-click context menu==
 
 
 
This error occurs on pre-Vista versions of Windows with all versions of Audacity, when you create a custom right-click Explorer context menu item for a particular file type, using the "Folder Options" applet in the Windows Control Panel. For example you might want to create a custom context menu item to edit .WAV files with Audacity, but leave the default action when you double-click a .WAV file such that it plays with Windows Media Player.  The symptoms of the error are that Audacity gives multiple warnings that it cannot open files which each have a name corresponding to one word of the file name. Note this error does not occur when using the Windows built-in "Open With" context menu item. To correct this problem in pre-Vista versions of Windows:
 
 
 
# Click {{menu|Windows Start button > (Settings) > Control Panel > Folder Options}}.
 
# Click on the {{menu|File Types tab}}.
 
# Navigate to the file extension for your context menu item, e.g. WAV, and click "Advanced"  
 
# In the "Actions" window, select your right-click menu command and click "Edit"
 
# In "Application used to perform action", enclose the %1 after the path inside quotes, for example:<br>{{path|"C:\Program Files\Audacity 13 Beta\audacity.exe" "%1"}}
 
 
# Click OK, OK and Close.
 
# Click OK, OK and Close.
  
Now you can right-click over the file in Explorer, click your context menu item and the file will import properly.
 
 
Unfortunately, Vista lacks any direct way to either create or edit custom context menu items, so to create such you will need a third party application. You can try File Type Doctor from the {{external|[http://www.creativelement.com/powertools/ Creative Element Power Tools]}} (shareware) or {{external|[http://softpro.1930.ru/downloads/fe/fesetup.exe Fast Explorer]}} (freeware - but to edit any existing context menu such as those added by other programs, you have to delete them then recreate them). 
 
 
As an alternative workaround to stop Audacity trying to open each word of a file as a separate file, for each file you want to open from your context menu, replace the spaces in the filename with an underscore e.g.
 
 
:{{path|C:\Multimedia\audio_files\very_beautiful_melodies.wav}}
 
 
There is also another way to open a file without having to launch Audacity first and use its "Import Audio" command. This is to drag the file onto the Audacity icon (e.g. on your desktop or in your Program_Files folder).
 
  
 +
'''Windows 10''', '''Windows 8''', '''Windows 7''' and '''Windows Vista'''  lack any direct way to either create or edit custom context menu items. You can use free third-party applications such as [http://defaultprogramseditor.com/ Default Programs Editor] or [http://winaero.com/download.php?view.62 Context Menu Tuner] (for Windows 7 or later) for this purpose.
 +
{{Advice|'''File names including spaces:'''
 +
Don't forget the "<nowiki>%1</nowiki>" after the path to Audacity. If this is missing, Audacity will think file names including spaces are separate files, and give an error for each one, or not open the file at all. 
 +
As a quick alternative to editing an incorrect context menu entry, replace the spaces in the file name with an underscore, for example: <br>
 +
{{path|C:\Multimedia\audio_files\very_beautiful_melodies.wav}}}}
  
==Error opening more than one file from right-click context menu==
+
<div id="context_mult"></div>
  
Using 1.2.x versions of Audacity under Windows, you cannot right-click and open multiple files using your custom context menu, or right-click and open any files once Audacity is already running; you will simply receive an "Audacity already running" error. If you need to open multiple files from right-click, or open them from right-click when Audacity is already running, you will need to use the {{external|[http://audacity.sourceforge.net/download/beta_windows Beta 1.3.3 version of Audacity]}}. Even then (due to a current bug), if you import multiple files from right-click, Audacity will import each file after the first one twice.
+
===Opening multiple files from the context menu===
  
 +
"Open with" on Windows only supports opening one file at a time.
  
==Moving and renaming Project files and folders==
+
You can right-click and open multiple files, or right-click and open ''any'' files if Audacity is already running. Each file will open in a new project window.
 +
{{Hint|
 +
Other ways to open a file or files without having to launch Audacity first are to select them and then press {{kbrd|Enter}}; or select them then drag them onto the Audacity icon (for example, on your desktop or in your Program Files folder).}}
 +
  
'''''(To be added.)'''''
 
  
[[Category:Tips]]
+
{{CategoryTips}}

Latest revision as of 12:45, 21 August 2017

Context menus

A context menu is the menu of options accessible when you right-click over a file in the operating system's file manager (for example, Explorer in Windows). The following information applies to Windows, but similar principles apply to other operating systems.

Open with

This context menu item allows you to open the file with applications other than the default application associated with that file type. You can add an application to the "Open with" menu and choose if that application will now be the default application to open that file type when you double-click it.

Once a application has been added to the "Open with" menu, it will be listed when you hover over "Open with". If you add Audacity to "Open with", this provides a way to open files with Audacity when it isn't already running, but retain the default double-click action to play the file with Windows Media Player. If a track is already open in Audacity when you execute "Open with", your file will be opened in a new project window.

Warning icon On Windows, the Audacity executable cannot be added to Explorer's "Open with" menu if there is already a Registry entry pointing to another "audacity.exe". This is a Windows limitation. It could arise when you update from legacy Audacity 1.3.x (which had its own installation folder) to current Audacity. Try any of the following workarounds.
  • Use the Open with dialog to browse to the required executable each time.
  • Rename one executable to a unique name such as "audacity_2.exe", then use Open with > Choose default application..., browse to the renamed executable then enable "Always use the selected app to open this kind of file".
    • If you update Audacity again, you must rename the new audacity.exe to the same name you used before, or add a new association to the new executable renamed to another name.
  • Download and run this registry file as administrator. Rename it to "AudacityAssociationCleaner.reg" (without quotes) before running it.
  • Install CCleaner and run its Registry cleaner as administrator.

Custom context menus

To give more direct context menu access to Audacity, Windows lets you add a custom context menu item of your own for a file type, such as "Edit WAV in Audacity".

To create a custom context menu item in Windows 98, ME, 2000 or XP:

  1. Click Windows Start button > (Settings) > Control Panel > Folder Options, or Tools > Folder Options from inside Explorer
  2. Click on the File Types tab
  3. Navigate to the file extension for your context menu item, such as WAV, and click "Advanced"
  4. In the window that appears, click "New" to add a new context menu item (or to change an existing item, click "Edit")
  5. In the "Action" box, type or change the entry as you wish it to appear in the menu (for example, Edit WAV in Audacity)
  6. In the "Application used to perform action" box, type the full path to the Audacity executable inside quotes, followed by %1 inside quotes, for example:
    "C:\Program Files\Audacity 2.0.0 (Unicode)\audacity.exe" "%1"
  7. Click OK, OK and Close.


Windows 10, Windows 8, Windows 7 and Windows Vista lack any direct way to either create or edit custom context menu items. You can use free third-party applications such as Default Programs Editor or Context Menu Tuner (for Windows 7 or later) for this purpose.

Warning icon File names including spaces:

Don't forget the "%1" after the path to Audacity. If this is missing, Audacity will think file names including spaces are separate files, and give an error for each one, or not open the file at all. As a quick alternative to editing an incorrect context menu entry, replace the spaces in the file name with an underscore, for example:
C:\Multimedia\audio_files\very_beautiful_melodies.wav

Opening multiple files from the context menu

"Open with" on Windows only supports opening one file at a time.

You can right-click and open multiple files, or right-click and open any files if Audacity is already running. Each file will open in a new project window.

Other ways to open a file or files without having to launch Audacity first are to select them and then press Enter; or select them then drag them onto the Audacity icon (for example, on your desktop or in your Program Files folder).