-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspiderweb.ps1
More file actions
32 lines (28 loc) · 897 Bytes
/
spiderweb.ps1
File metadata and controls
32 lines (28 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$files = @(
".env",
"pages/index.tsx",
"pages/api/answer.ts",
"pages/api/save-query.ts",
"pages/api/search.ts",
"utils/index.ts",
"components/SearchBar.tsx",
"components/SearchResults.tsx",
"components/Answer/Answer.tsx",
"types/index.ts",
"next.config.js"
)
$outputFile = "file_contents.txt"
$separator = "=" * 50
foreach ($file in $files) {
if (Test-Path $file) {
Add-Content -Path $outputFile -Value $separator
Add-Content -Path $outputFile -Value "File: $file"
Add-Content -Path $outputFile -Value $separator
Get-Content -Path $file | Add-Content -Path $outputFile
Add-Content -Path $outputFile -Value ""
} else {
Add-Content -Path $outputFile -Value "File not found: $file"
Add-Content -Path $outputFile -Value ""
}
}
Write-Host "File contents have been stored in $outputFile"