View this file in Explorer (while open in notepad++) - macos

I have file.txt opened in notepad++.exe
This works with all filetypes (.xlsx .txt .tab .csv .pages .scrivener you get it) on OS X:
I right click the file name using the app I'm in. (On notepad++ on windows, this would be right clicking on my file.txt file.)
A menu pops up, showing me the path to that file. For example /dropbox/work/projectA/subfolderB/file.txt
I choose a certain folder, for example the folder /projectA
That folder opens up in finder.
I want to do this on windows 7. Extra important to do it in notepad++ with .txt-files, since those are part of my GTD-system.

The question is not at all clear about what you want.
Having installed Notepad++ via the normal installer, you should be able to right-click on a file in Windows Explorer (or File Explorer) and select "Edit with Notepad++". That allows any file to be viewed with Notepad++.
The Notepad++ Run menu should contain an entry for Open containing folder that opens Windows Explorer at the folder containing the current file. This command shoul dbe in the file c:\Users\{UserName}\AppData\Roaming\Notepad++\shortcuts.xml. The shortcuts file on My Windows 7 computer contains the line
<Command name="Open containing folder" Ctrl="no" Alt="no" Shift="no" Key="0">explorer $(CURRENT_DIRECTORY)</Command>
If you need to alter the shortcuts file then do not use Notepad++, use another editor.

Related

All file text in hexa when open folder in Sublime Text Editor

I can work well in Sublime text when I open a single file. However, when I want to open a folder, all the files in that folder will be shown in Hexa and the file name will change to ._filename.
Try opening the file with a different encoding. You can do so using "File > Reopen with Encoding" or put "show_encoding": true in user settings and restart to view the encodings and choose the right one.

How to copy path of a file in Mac OS?

I am looking for a shortcut to copy the path of a file in Mac OS. I generally require it to copy paste in editor.
All you need to do to copy any items path name directly to the clipboard from anywhere in the file system:
Navigate to the file or folder you wish to copy the path for Right-click (or Control+Click, or a Two-Finger click on trackpads) on the file or folder in the Mac Finder
While in the right-click menu, hold down the OPTION key to reveal the “Copy (item name) as Pathname” option, it replaces the standard Copy option
Once selected, the file or folders path is now in the clipboard, ready to be pasted anywhere
The copied pathname is always the complete path, it’s not relative.
More details on the following link: http://osxdaily.com/2015/11/05/copy-file-path-name-text-mac-os-x-finder/
Try with shortcut command+option+C:
Cmd-Opt-C

How can I open command prompt in the current directory as a shortcut

I'm just wondering how I can make a shortcut that will open command prompt in the folder it is currently in.
Why I need this.
I save my c program file in the directory Users\PC\Documents\Other\My_Programs\WIP\Project_1\Test\
So I would have to type cd Users\PC\Documents\Other\My_Programs\WIP\Project_1\Test\ every time I want to open the command prompt in that directory.
Is there a shortcut I can make where I can move that shortcut around anywhere (don't need to change the shortcut) and it will open command prompt in the directory it is current in, so I don't need to keep typing cd .....
you can go to the directory and just type start . in the same directory
or you can make a batch file like test.bat and add below line in the same:
cd Users\PC\Documents\Other\My_Programs\WIP\Project_1\Test\
Save it anywhere and whenever you will run that batchfile, it will automatically move PWD to the required directory
Right-click in the open space of your desktop and click New > Shortcut
For the location, type or copy and paste one of the following lines.
%windir%\system32\cmd.exe /k cd Users\PC\Documents\Other\My_Programs\WIP\Project_1\Test\
As commented by aschipfl, you can already do it, (may be OS dependent)!
In Windows Explorer, or I suppose the desktop, just hold down the shift key, right click in a blank area of it and choose Open command window here, (or whatever your locale states).
I think in Windows 10 at least, the option is even available in the Explorer toolbar menu too.

How to unzip several *.zip archive files into separate folders?

I searched with Google but I didn't find something for Windows.
How can I extract several files into several folders?
For example: a.zip, b.zip and c.zip into the folders a, b and c.
I am looking for a command prompt command or a batch file solution.
Thanks
With using WinRAR in GUI mode:
Start WinRAR.
Select all the *.zip files.
Click on icon Extract To in toolbar.
Enter destination folder or browse to destination folder.
Check the option Extract archives to subfolders in group Miscellaneous.
Click on button OK.
In case of you want to know more about those extracting options, click before on button Help.
Or use from command line with current directory containing the *.zip files and all archive files which should be also extracted into subfolders of current directory with name of ZIP file as folder name:
"%ProgramFiles%\WinRAR\WinRAR.exe" x -ad -cfg- -ibck *.zip
How to build such a WinRAR command line?
Start WinRAR.
Click in menu Help on Help topics.
Click on tab Contents on list item Command line mode.
Click on list item Command line syntax, read this help page and copy the bold line into a text editor or into a command prompt window.
Click on tab Contents on list item Commands.
Click on list item Alphabetic commands list and replace <command> in text editor or command prompt window by most suitable command letter for the task.
Click on tab Contents on list item Switches.
Click on list item Alphabetic switches list and replace -<switch1> -<switchN> in text editor or command prompt window by those switches which are useful for the task.
Replace the rest of the WinRAR command line in text editor or command prompt window by the appropriate file and/or folder names.
The short explanation of the most important switch -ad for this task is:
-ad append archive name to destination path
As it can be seen here, WinRAR supports even a wildcard pattern as archive file name for extracting all archives files matching the pattern.
One more method exists with shell integration enabled as by default after installation of WinRAR.
Select the archive files to extract in file manager (Windows Explorer).
Click with secondary (right) mouse button on one of the selected files to open the context menu.
Open context submenu WinRAR if there is such a submenu because of enabled setting Cascaded context menus in WinRAR - Options - Settings - Integration.
Click on context menu item Extract each archive to separate folder.

Fastest way to copy the full path of a file and insert it into a script

In many task I've to open a file with a script so I've to type the full path of the file. Usually I go to properties of the file and then I copy the path and then the name of the file. I wonder if there is a faster way to do that.
I would like to copy it in one click or drag the file in the IDE or something like that....
(I'm using Windows XP, Mac Mountain Lion and Ubuntu 12.04 sometimes).
In windows pressing shift and right-click allows you to select copy path.
In Mac right click and pressing alt allows copying file as path.
I've found Copy path for Windows that:
that will allow you to right click on a drive or file system object
and copy the path of the file to the clipbpoard. If the drive is a
mapped drive or the file system object exits on a mapped drive it will
resolve the full UNC path.
On Windows Shift+Right Click allows you to copy the path directly.
Alternatively many shell (like the shells of Spyder and Canopy,Ipython) support a drag and drop option that allow you to drag the file inside the shell and get the path of the file.

Resources