I'm creating a python script to automate creating directory junctions in my Documents folder. After a directory junction is created, I want the file (not the target folder) to be hidden in File Explorer so I don't see it when browsing my Documents folder. Is there a way to hide directory junctions in File Explorer via the command line?
I tried attrib +h C:\Users\MyName\Documents\DirectoryJunctionName but DirectoryJunctionName was still visible in file explorer. attrib worked with the same syntax for txt files, so this is something specific to directory junctions and how File Explorer displays them.