CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 09:28:45 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=5ee0f3b992374058a207834ccde991282b349ee6969087af5b9fd9df113eee71a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22mTF2emjr8PC9UAuJvaITX6dwSkli2Rzs%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cd543a7d675ace-BLR
File Path in Excel - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub ListAllFilesAndFolders()
- Dim ws As Worksheet
- Dim fso As Object
- Dim mainFolder As Object
- Dim subFolder As Object
- Dim file As Object
- Dim folderPath As String
- Dim rowNum As Integer
- ' Create or set worksheet
- On Error Resume Next
- Set ws = Sheets("File List")
- On Error GoTo 0
- If ws Is Nothing Then
- Set ws = Sheets.Add(After:=Sheets(Sheets.Count))
- ws.Name = "File List"
- End If
- ' Clear existing data
- ws.Cells.Clear
- ws.Range("A1:C1").Value = Array("Path", "Name", "Type")
- ws.Range("A1:C1").Font.Bold = True
- ' Get folder path from user
- folderPath = InputBox("Enter the folder path:", "Folder Path", "C:\")
- If folderPath = "" Then Exit Sub
- ' Check if folder exists
- Set fso = CreateObject("Scripting.FileSystemObject")
- If Not fso.FolderExists(folderPath) Then
- MsgBox "Folder does not exist!", vbExclamation
- Exit Sub
- End If
- ' Start listing files and folders
- rowNum = 2
- Application.ScreenUpdating = False
- ' Process main folder
- Set mainFolder = fso.GetFolder(folderPath)
- ' List all subfolders first
- For Each subFolder In mainFolder.SubFolders
- ws.Cells(rowNum, 1).Value = subFolder.Path
- ws.Cells(rowNum, 2).Value = subFolder.Name
- ws.Cells(rowNum, 3).Value = "Folder"
- rowNum = rowNum + 1
- ' Recursively process subfolders
- rowNum = ProcessSubFolder(subFolder, ws, rowNum)
- Next subFolder
- ' List all files in main folder
- For Each file In mainFolder.Files
- ws.Cells(rowNum, 1).Value = file.Path
- ws.Cells(rowNum, 2).Value = file.Name
- ws.Cells(rowNum, 3).Value = "File"
- rowNum = rowNum + 1
- Next file
- ' Format the worksheet
- ws.Columns("A:C").AutoFit
- ws.Activate
- Application.ScreenUpdating = True
- MsgBox "File and folder listing complete!", vbInformation
- End Sub
- Function ProcessSubFolder(parentFolder As Object, ws As Worksheet, startRow As Integer) As Integer
- Dim subFolder As Object
- Dim file As Object
- Dim rowNum As Integer
- rowNum = startRow
- ' Process all subfolders of the parent folder
- For Each subFolder In parentFolder.SubFolders
- ws.Cells(rowNum, 1).Value = subFolder.Path
- ws.Cells(rowNum, 2).Value = subFolder.Name
- ws.Cells(rowNum, 3).Value = "Folder"
- rowNum = rowNum + 1
- ' Recursively process subfolders
- rowNum = ProcessSubFolder(subFolder, ws, rowNum)
- Next subFolder
- ' Process all files in the parent folder
- For Each file In parentFolder.Files
- ws.Cells(rowNum, 1).Value = file.Path
- ws.Cells(rowNum, 2).Value = file.Name
- ws.Cells(rowNum, 3).Value = "File"
- rowNum = rowNum + 1
- Next file
- ProcessSubFolder = rowNum
- End Function
Tags:
file path
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Online Marketplace Exploit ✅ NEVER SEEN BE...
JavaScript | 10 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ 4
JavaScript | 13 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ L
JavaScript | 14 sec ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 19 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 8
JavaScript | 24 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ 1
JavaScript | 26 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 28 sec ago | 0.24 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 30 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand