Comparison tool with option to check file names only? - comparison

I'm looking for a folder comparison tool that has an option to check file names only, not timestamps or content.
I've tried Araxis Merge, Beyond Compare, and WinMerge, but none seem to have this option.

Beyond Compare does support that. Use the Session->Session Settings... menu item and on the Comparison tab uncheck everything. If you want to check for case changes check the Compare filename case option.

Well, if you need a comparison list, that only schecks the name of the file, a very easy way to do it would be with two xcopy commands:
xcopy "<source>" "<dest>" /e /l /f >\fullList.txt
xcopy "<source>" "<dest>" /e /l /u /f >\equals.txt

Related

Is it possible to set the properties on the command line for sourceanalyzer?

I'd like to change the scan properties on only one project for our build server. I've found tons of references for what to change in the various fortify ".properties" files, but I don't want to make any changes that will be universal.
Is it possible to either define these on the command line or, even better, specify a specific .properties file to use only for the current scan?
Note, this has to be via the command line.
Yes, for any property that you want to change put it in the appropriate command line (translate vs scan) in the following format:
-D<property key>=<property value>
for example
sourceanalyzer -b mybuild -Dcom.fortify.sca.fileextensions.sql=PLSQL *.sql

Replacing dos executable names with custom short names?

I've been using the command prompt to practice assembly programs and I wish to use notepad++ as the editor. Adding notepad++ to the path will do the job but I don't want to type 'notepad++' each time I have to edit a file. Is there a way I can change the name of the executable? Without having to rename the application name.
You could create a quick batch file called, say, npp.cmd. That batch file only needs to have this in it:
#"C:\Program Files (x86)\Notepad++\notepad++.exe" %*
Put npp.cmd somewhere in your path (I have a C:\tools directory for batch files like this) and off you go.
Or associate your assembler sources with Notepad++.
ASSOC .asm=asmfile
FTYPE asmfile="C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"
Then you can edit *.asm files with Notepad++ by double clicking on it in Explorer or by writing it's name in command prompt.

How can I find all of the labels for a particular TFS project sub-folder?

Assume there is a TFS project Project with the subfolders trunk and 1.0. trunk contains the latest version of the application code for this project and 1.0 contains the code for the same application for the released version of the same name.
There are labels for both sub-folders and all of the labels include files in only one of the sub-folders. [You could also assume that the labels are recursive on a specific (maximum) changeset for all of the files in the entire sub-folder too if that simplifies your answer.]
How can I create a list of labels for one of these sub-folders, using Visual Studio, the TFS tf.exe command line tool, or any other tool or code that is publicly (and freely) available.
Note – I've written T-SQL code that queries the TFS version control database directly to generate this info, but I'm curious whether there are 'better' ways to do so.
In Visual Studio, in the Source Control Explorer window, right-click the sub-folder for which you want to list the relevant labels and pick View History from the context menu. In the History window that should appear, there should be a sub-tab Labels (as highlighted below) that lists labels applied to that sub-folder (but not specific items in that sub-folder).
To find labels in Visual Studio
Open Source Control Explorer.
In Source Control Explorer, open the shortcut menu for the collection, team project, branch, folder, or file that you are looking for.
Select View History. You will see a new window with all the Changesets.
Select Labels in the tab menu as highlighted in the below image.
I needed to do this on the command line today so here is a batch file that hopefully does the same thing (we've only just started using TFS and have limited labels on folders to test the OP's requirements).
You'll need to edit the collection parameter to tf to whatever your setup is, and possibly provide the login details depending on how your authentication is done.
#ECHO OFF
SETLOCAL EnableDelayedExpansion
#REM Check required parameters
IF [%1]==[] GOTO :usage
tf labels /owner:* /format:detailed %2 /collection:http://server:8080/tfs/collection > labels.txt 2> nul
SET CURRENT_LABEL=
FOR /F "tokens=1,2,3" %%G IN (labels.txt) DO (
IF [%%G]==[Label] (
SET CURRENT_LABEL=%%I
) ELSE (
IF /I [%%H]==[%1] (
ECHO !CURRENT_LABEL!
)
)
)
DEL labels.txt
GOTO :eof
#REM Subroutines
:usage
echo tfs_labelsforfolder - Display all labels that are applied to a folder.
echo.
echo tfs_labelsforfolder ^<folder^> ^[label_filter^]
echo.
echo folder - The folder to show the labels for, e.g. $/Project/folder
echo label_filter - Search pattern to use in tf labels command.
echo.
GOTO :eof

VIM folding for ERB files?

Vim noob here. I have code folding working in most places, via indent mode, but for some reason I cannot get Vim to fold .html.erb files in ruby... even with indents.
Here's the relevant region of my vimrc. Is there something else I need to do to make Vim aware of the erb files? Is it possible to customize my folding per file type?
I'm running all the Janus plugins, so have rails.vim, etc. all installed.
let ruby_fold=1
set foldmethod=indent
set foldcolumn=0
set foldlevel=99
nnoremap <space> za<cr>
It's a difficult question, because there's probably something in your vim configuration that inhibits folding and I, for example, can't reproduce it. But I can suggest a few things you could try.
First of all, check what the values of those settings are in the actual buffer. Meaning, open up an erb file and check if the settings are correct. In order to do that, you can type, for example, set foldmethod, which will echo the current value of foldmethod to the screen. If one of the settings doesn't match the ones in your .vimrc, then that might be the problem.
Also, see if the file really does have the "eruby" filetype. If it's not displayed in your statusline, you could check that with set filetype.
Most importantly, one way of customizing settings per filetype is by creating a file with the filetype's name inside the ~/.vim/ftplugin directory. In your case, you can create the file ~/.vim/ftplugin/eruby.vim and put any filetype-specific settings in it. Setting them with setlocal instead of set will keep them local to the file. If it turns out the settings for erb are off, you can "fix" them by putting the values you want there.

tf.exe folderdiff diffing files in specific folders

I want to be able to diff all my app.config files that resides in folders called MessagingService. I have read the documentation on the tf.exe about 50 times now, and I can't understand that the syntax should be different than:
tf.exe treediff $/myproject/main $/myproject/prod /filter:"app.config;MessagingService\" /r
but this leaves no results. As far as I can understand the folder inclusion mask does not behave as expected, because the following line works fine:
tf.exe treediff $/myproject/main $/myproject/prod /filter:"app.config;!MessagingService\" /r
but of course it displays only the app.configs I'm not interested in :)
Any enlightening comments are highly appreciated.
try this one ...
tf.exe treediff $/myproject/main $/myproject/prod /filter:"app.config;*MessagingService*\" /r
I believe stars are needed after and before MessagingService word because "app.config" IS the entire filename but MessagingService word IS NOT the entire path value, it is just a part of the actual file path.

Resources