Solved Clear properties of files from a folder (1 Viewer)

zelarra821

Registered User.
Local time
Today, 04:41
Joined
Jan 14, 2019
Messages
809
Good afternoon.

I am looking for a procedure that clears the properties of files from a folder.

Googling, the most I've found is this, that what it does is list the properties, but I don't know how I can delete them.

Code:
Sub ExtendedFileDetails(FolderName As String, FileName As String)
    Dim myFolder As Folder
    Dim myItem As FolderItem
    Dim myShell As New Shell
    Dim i As Long
    Dim Headers(0 To 34) As Variant

    Set myFolder = myShell.Namespace(FolderName)
    Set myItem = myFolder.ParseName(FileName)

    For i = 0 To 34
        Headers(i) = myFolder.GetDetailsOf(myFolder.Items, i)
    Next i

    For i = 0 To 34
        Debug.Print i & vbTab & Headers(i) & vbTab & myFolder.GetDetailsOf(myItem, i)
    Next i
End Sub

Thanks
 

zelarra821

Registered User.
Local time
Today, 04:41
Joined
Jan 14, 2019
Messages
809
What I want to delete are all these properties:

0 Nombre Prueba
1 Tamaño 458 MB
2 Tipo de elemento MP4 Video File (VLC)
3 Fecha de modificación 19/04/2021 19:25
4 Fecha de creación 19/04/2021 19:25
5 Fecha de acceso 19/04/2021 19:27
6 Atributos A
7 Estado sin conexión
8 Disponibilidad
9 Tipo percibido Vídeo
10 Propietario LAPTOP\Usuario
11 Clase Vídeo
12 Fecha de captura
13 Intérpretes colaboradores Furgocanine
14 Álbum
15 Año 2021
16 Género
17 Conductores
18 Etiquetas
19 Clasificación Sin clasificación
20 Autores Furgocanine
21 Título ¡MERECIÓ LA PENA HACER ESA CARRETERA CON LA FURGO! | NIED#4
22 Asunto
23 Categorías
24 Comentarios
25 Copyright
26 Número de pista
27 Duración 00:14:25
28 Velocidad de bits ?127kbps
29 Modo protegido No
30 Modelo de cámara
31 Dimensiones
32 Fabricante de cámara
33 Organización
34 Descripción del archivo

With the function that you have passed it is not possible.
 

Isaac

Lifelong Learner
Local time
Yesterday, 19:41
Joined
Mar 14, 2017
Messages
8,777
True, you may have to adjust conceptually to proactively setting an attribute rather than 'clearing' all - at least with the suggestion I posted. Or you may need a 3rd party tool to adjust MP4 properties specifically
 

zelarra821

Registered User.
Local time
Today, 04:41
Joined
Jan 14, 2019
Messages
809
True, you may have to adjust conceptually to proactively setting an attribute rather than 'clearing' all - at least with the suggestion I posted
And how do I do it?
 

zelarra821

Registered User.
Local time
Today, 04:41
Joined
Jan 14, 2019
Messages
809
I just want to know if it is possible. With the method that you gave me what I can do is make it visible or read, for example. I don't see how that can allow me to remove the properties from the file.
 

Isaac

Lifelong Learner
Local time
Yesterday, 19:41
Joined
Mar 14, 2017
Messages
8,777
I think you can only use SetAttr for a limited number of widely used file attributes. For MP4 specifically, you may need some kind of 3rd party tool that can adjust attributes specific to MP4's.

What I meant in post 4 was simply that maybe you can't remove an attribute that Windows requires. For example, if a file was marked as Hidden, you could change to no longer be hidden, but you probably couldn't actually change the file such that it no longer has the potential to be Hidden, because all windows files have to have that property.
 

Users who are viewing this thread

Top Bottom