You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional. Directs the results from the current search to be appended to previous search results.
38
+
/append: `resultwindowname` (new in Visual Studio 2022)\
39
+
Optional. Directs the results from the current search to be appended to previous search results, identified by `resultwindowname` argument. Find Result windows are named by the first search term that resulted in creation of the window.
Optional. Matches occur only if the uppercase and lowercase characters exactly match those specified in the `findwhat` argument.
@@ -54,7 +60,7 @@ Optional. Displays a list of file names that contain matches.
54
60
Optional. Displays a list of the current find option settings and does not perform a search.
55
61
56
62
/regex or /r\
57
-
Optional. Uses pre-defined special characters in the `findwhat` argument as notations that represent patterns of text rather than the literal characters. For a complete list of regular expression characters, see [Regular Expressions](../../ide/using-regular-expressions-in-visual-studio.md).
63
+
Optional. Uses predefined special characters in the `findwhat` argument as notations that represent patterns of text rather than the literal characters. For a complete list of regular expression characters, see [Regular Expressions](../../ide/using-regular-expressions-in-visual-studio.md).
58
64
59
65
/reset or /e\
60
66
Optional. Returns the find options to their default settings and does not perform a search.
@@ -73,7 +79,7 @@ Optional. Searches the subfolders within the directory specified in the /lookin:
73
79
Optional. Displays the results of the search in the Find Results 2 window.
74
80
75
81
/wild or /l\ (not supported in Visual Studio 2022)
76
-
Optional. Uses pre-defined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.
82
+
Optional. Uses predefined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.
Copy file name to clipboardExpand all lines: docs/ide/reference/replace-in-files-command.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,15 @@ Required. The text to substitute for the matched text.
40
40
41
41
Optional. Replaces all occurrences of the search text with the replacement text.
42
42
43
-
/append (new in Visual Studio 2022)
43
+
/append: `resultwindowname` (new in Visual Studio 2022)
44
44
45
-
Optional. Directs the results from the current search to be appended to previous search results.
45
+
Optional. Directs the results from the current search to be appended to previous replace results, identified by `resultwindowname` argument. Replace Result windows are named following the following pattern: Replace "findWhat" with "replaceWith".
46
+
47
+
#### Example (note that Command Window uses ^ character to escape quotes)
>Edit.ReplaceInFiles "Console.Write(" "//Console.Write(" /lookin:"Entire Solution" /a /append:"Replace ^"Console.WriteLine(^" with ^"//Console.WriteLine(^""
51
+
```
46
52
47
53
/case or /c
48
54
@@ -70,7 +76,7 @@ Optional. Preserves the original casing of each match in your code.
70
76
71
77
/regex or /r
72
78
73
-
Optional. Uses pre-defined special characters in the `findwhat` argument as notations that represent patterns of text rather than the literal characters. For a complete list of regular expression characters, see [Regular Expressions](../../ide/using-regular-expressions-in-visual-studio.md).
79
+
Optional. Uses predefined special characters in the `findwhat` argument as notations that represent patterns of text rather than the literal characters. For a complete list of regular expression characters, see [Regular Expressions](../../ide/using-regular-expressions-in-visual-studio.md).
74
80
75
81
/reset or /e
76
82
@@ -94,7 +100,7 @@ Optional. Displays the results of the replacement in the **Find Results 2** wind
94
100
95
101
/wild or /l (not supported in Visual Studio 2022)
96
102
97
-
Optional. Uses pre-defined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.
103
+
Optional. Uses predefined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.
0 commit comments