Find a text in all solutions of Team Foundation 2010 - visual-studio-2012

I am a developer usin VS2012, I have the code in a Team Foundation 2010 (I am not the administrator of this).
I would like to find some text in all the solutions of muy own at the same time.
The "Find and Replace" tool does not help me because this finds just in one solution.
Could anyone help me? Thanks in advance!

You can't do a search on the TFS server directly. You need to check out all the code you want to look through to your local machine first.
Assuming you have done that then you can use the Find in Files option (usually CtrlShiftF) and change the search scope to use a path or folder set by clicking the ... button next to the Look in drop down.

If you're happy to use PowerShell and you have all the code files you want to search through on your local disk, you can run the following from the PowerShell ISE:
$locationToSeach = "C:\tfs\"
$pattern = "searchtext"
cd $locationToSearch
gci -recurse -include *.* | Select-String -pattern $pattern
If you want prettier formatting (e.g. for copy to Excel), pipe the above to:
Format-Table #{Name='Path'; Expression={$_.Path}; Width=150}, #{Name='Line'; Expression={$_.Line -replace '^\s+', ''}; Width=200}

Related

Recursively Find Files With Particular File Extension and Content

I'm using Windows 10 and the development folders contain a lot of files, I want to search the entire folder tree for a specific keyword but only specific file types.
The folder contains lots of python scripts I want to search only the python scripts for specific keywords. Is there any way to do this with the Windows file search?
Seems like a pretty big omission on something that is fundamental in search.
What do you mean by keyword? Is that a word, present inside the file? Or is it a part of the filename?
In case it's the part of the filename, you can use file: in the Windows search, like in following example:
file:*keyword*.py
This will show you all files, called *keyword*.py. After you've done that, you might change your Windows explorer's view, clicking on the "View" tab and choose "Details", this will also show you the directory where those files are located.
Let's say you want to search the current folder and all its sub-folders recursively for files with the .py file extension that contain the string bar. Open PowerShell in this folder and enter the following command:
Get-ChildItem -Include "*.py" -recurse | Select-String -pattern "bar" | group path | select name
-Include also supports multiple comma-separated file extensions, e.g.: -Include "*.py","*.xml"

How To Start Windows Store Apps in AutoHotKey?

Window Store apps are not like the classic Windows apps. The latter usually are installed at clear paths under C:\Program Files. So, AutoHotKey (AHK) scripts can simply run a classic app by "Run" with the path to the app executable. However, it seems there is no simple path to Windows Store app executables. So, how to start Windows Store apps in AutoHotKey scripts with a simple way?
Assume the OS is Windows 10. The following steps are a simple way to start Windows Store app in AHK script:
Create a folder, e.g. D:\WinStoreAppLinks
Drag and drop a Windows Store app, e.g. OneNote (mobile), by mouse in All App List to D:\WinStoreAppLinks (through File Explorer). It will create a link there, OneNote. You can rename it as you want.
The app can be run in AutoHotKey scripts (or Command Prompt), by e.g.:
Run, D:\WinStoreAppLinks\OneNote
Run shell:AppsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App
Check shell:AppsFolder for full app names list
Here is a more verbose answer that worked for me:
In an Explorer window navigate to shell:AppsFolder. This is a directory with all your Windows apps
Find the app you want to launch (in my case Windows Terminal), right click it, and select Create Shortcut
Accept the prompt to create this shortcut on your desktop
Put this shortcut somewhere other than your desktop (e.g. C:\Shortcuts). Rename if desired
Add this to your AHK script:
Run, "C:\Shortcuts\Windows Terminal"
Then simple reload your AHK script. Enjoy
This autohotkey script https://github.com/JuanmaMenendez/AutoHotkey-script-Open-Show-Apps works perfectly with any kind of app.
In the specific case of Windows Store Apps, read the section Find AppUserModelID and use the Utility Function c)
Some of the other answers have the right idea, but are vague about which specific values to use or where to find them. Other answers have breaking typos. So here is an explanation of what you truly need, without requiring any additional shortcuts.
The Windows Store apps are in the Apps Folder, which you can see by entering shell:AppsFolder in the Win+R run window. The location identifier for the app is in the form: shell:AppsFolder\<PackageFamilyName>!<Name.id>, where <PackageFamilyName> and <Name.id> are placeholders. You'll need to replace those placeholders with the values for your application. For example, the location string for WhatsApp is shell:AppsFolder\5319275A.WhatsAppDesktop_cv1g1gvanyjgm!WhatsAppDesktop.
To discover the values for your application, go into PowerShell and look through the output of Get-AppxPackage to find the application you want. You can probably find it using: Get-AppxPackage -Name "*<AppName>*", substituting your own <AppName>. (Don't forget the asterisk wildcard.) The following will find WhatsApp, for example:
Get-AppxPackage -Name "*WhatsApp*"
If you still can't find it, enter the following in PowerShell and hit the spacebar to page through the output:
Get-AppxPackage * | more
Finally once you've formed the full application location identifier, use it in AutoHotkey like this:
Run "explorer.exe shell:AppsFolder\5319275A.WhatsAppDesktop_cv1g1gvanyjgm!WhatsAppDesktop"
Note that this uses the AutoHotkey v2 syntax.
Tested on 27.10.2020 (and works)
If you know turkish, check this site
You can use this powershell script to find the command of store apps
$appName = Read-Host "App name"
$installedapps = get-AppxPackage
foreach ($app in $installedapps)
{
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
{
$line = $app.Name + " = " + $app.packagefamilyname + "!" + $id
if ($line.IndexOf($appName, [System.StringComparison]::CurrentCultureIgnoreCase) -ge 0) {
echo "shell:appsFolder\$app.packagefamilyname!$id"
}
}
}
To use it, first copy this script to notepad and select all recopy and paste to powershell console
Example output for WhatsApp:
shell:appsFolder\5319275A.WhatsAppDesktop_2.2041.7.0_x64__cv1g1gvanyjgm.packagefamilyname!WhatsAppDesktop
Finally copy these command and use in AHK like
Run explorer.exe "shell:appsFolder\5319275A.WhatsAppDesktop_2.2041.7.0_x64__cv1g1gvanyjgm.packagefamilyname!WhatsAppDesktop"
We need to copy to notepad to avoid powershell end of line issue (official bug) that makes line reserved
I just used my desktop shortcut (I couldn't find my system shortcut)
run C:\Users\YourUserName\Desktop\Minecraft Launcher.lnk
I noticed that I could launch an app with the Run command by typing its name. So for example, to launch a Windows Store app with spaces in its name, you could try something like:
Run, Files UWP - Preview
... where "Files UWP - Preview" could be any app's full name, as it is shown in the Start menu.
An advantage to this solution is that it doesn't rely on a shortcut that could potentially get deleted.

Determine what file has changed or been created

I'm able to connect our CentOS 6.7 server to an external LDAP successfully but the last step in the process requires something in the GUI:
System > Administration > Authentication, then checking "Authentication Method"
I'd love to either know the exact file that this change in the GUI modifies or creates, or learn a method that I can use to show me which files have been created or modified in the last five minutes, for example. Of course, I have no idea which directory or directories this file was created or modified in.
I'm primarily a Mac user so we have tools in OS X that can be used for such a purpose, but I'm hoping there's an equivalent method in CentOD/RHEL.
Thanks in advance,
Dan
This isn't the exact answer I was looking for but does solve my immediate problem. The following find command shows recently created files, sorted by most recent:
find /etc -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r
Looks like the file changed by the GUI above is:
/etc/sysconfig/authconfig

Windows - Search for Files that Do NOT Contain a Certain Term

How would I search for anything in a certain directory that doesn't contain a certain term?
For example:
!(FINAL)
or
NOT(FINAL)
I would like to find anything (files only) that doesn't contain the term FINAL in the title in Windows XP. Is this possible?
Many thanks.
You can search for * NOT *FINAL* for example to find anything without the string final in it
If you are looking for something right from your explorer window, I just did some research since these answers here didnt suffice to me.
To find all php files which do not have "decoded" in their name, I put the following in the search field:
*.php -Decoded
Hope this helps!
Windows Command Prompt
To do this with Windows Command Prompt, CMD.
Start -> Run -> Type "cmd". use "cd" to change to your working directory and enter:
dir | findstr /v /i "FINAL"
This will list all files and folders which do not have the word "FINAL" in the title.
dir /a:-d | findstr /v /i "FINAL"
This will list all files which do not have the word "FINAL" in the title.
POWERSHELL
It is possible to do this with Windows PowerShell.
Get-ChildItem -exclude "*FINAL*"
This will list all files and folders which do not have the word "FINAL" in the title.
Get-ChildItem -exclude "*FINAL*" | where { ! $_.PSIsContainer }
This will list all files which do not have the word "FINAL" in the title.
You may need to download and install Windows PowerShell from here if your installation of XP does not already have it. Windows XP Powershell
Useful Links.
http://technet.microsoft.com/en-us/library/ee176841.aspx
In Windows File Explorer Search Box, type: -
NAME:AAAA (to find documents with AAAA in the title)
NAME:AAAA AND NAME:BBBB (to find documents with both AAAA and BBB in the title)
NAME:XXXX AND NOT:YYY (to find documents with XXXX in the title, but not YYY)
For what is worth, if you do have Total Commander (https://www.ghisler.com/index.htm), it has a pretty good search functionality.
It is able to look into files and has an explicit checkbox "Find files not containing the text"
(note: I am not affiliated with Total Commander in any way, but it is a good tool)
You can use a code like this:
grep -rin "find-what?" ./
You need cmd-bash for this. Makes the work easier!

Perforce P4v: How to find file with a list of file to be find?

Is there a way or command to be use to find files using a list of files to be find in a directory?
e.g.
find the following files:
text1.sql
text2.sql
text3.sql
text4.sql
text5.sql
text6.sql
Search in: c:\archive...
Not sure if this is what you are looking for, but try the following:
Search > Find File...
Enter the directory under "Search in:"
Enter the name of the file you are looking for under "Name contains:"
Click on Find.
I'm using the P4V client version 2012.1
Just putting out there that Saulo's answer is correct, however that Rev. Perforce Visual Client/NTX86/2008.2/188141 doesn't support it. So you probably need to upgrade if you don't have the menu option (as I had to).

Resources