Skip to content

Error extracting video metadata for file "E:\$$ Tuts\This is the end\9. Yeah Right.mp4": The filename, directory name, or volume label syntax is incorrect. (os error 123) #21800

Closed Answered by deadcoder0904
deadcoder0904 asked this question in Q&A
Discussion options

You must be logged in to vote

Alright, found the solution.

// Import required Deno modules
import { walk } from 'https://deno.land/std/fs/mod.ts'
import { exec } from 'https://deno.land/x/exec/mod.ts'
import * as path from 'https://deno.land/std/path/mod.ts'

// Function to calculate total watch time
async function calculateTotalWatchTime(folderPath: string): Promise<number[]> {
	let totalDurationInSeconds = 0

	const root = folderPath.replace(/"/g, '') // terminal bug that adds " if it foldername contains / at the end

	// Iterate through files in the folder and its subfolders
	for await (const entry of walk(root, { includeDirs: false })) {
		try {
			// Check if the entry is a regular file and a video file
			if (entry

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by deadcoder0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant