The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Hiding certain files from folder display?

    Discussion in 'Windows OS and Software' started by talkin73, Nov 10, 2005.

  1. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15
    I would like to hide the .DS_Store files as well as the duplicate files that appear once they are copied from my USB thumb drive... the ones that add '._' to the front of the file name, thus placing it at the top of the file list alphabetically but below folder names... very annoying visually.

    Some of the '._' files disappear when I select "Do not show hidden files and folders" in the Folder Options control panel. But, some remain as do the .DS_Store files. Anything out there that can selectively hide only those files? Or, software that lets you manually select to hide files "that start with..." or something similar? Thanks in advance.
     
  2. Brian

    Brian Working at 486 Speed NBR Reviewer

    Reputations:
    947
    Messages:
    8,970
    Likes Received:
    1
    Trophy Points:
    205
    I never see anything like that on my USB drives, what's the purpose of those files? Oh, and I'm not awayre of any way to filter out non-system files.
     
  3. ngocthach1130

    ngocthach1130 Notebook Guru

    Reputations:
    0
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    15
    Only thing i can think of is right click on those file and check to give them hidden file status. It's a step by step process and no way to do them by the masses. Sorry i don't know any program that do so either. Just have to take your time doing it one by one i guess. How many of those files are there anyway.
     
  4. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15
    I don't know the purpost of the files... to annoy me, perhaps :D They appear, I believe, when an app is run off the USB card on another computer, then mounted on my home computer. The Mac OS hides these from the viewer which I like. There's gotta be a way to get rid of these en masse. I'll keep searching...
     
  5. lmychajluk

    lmychajluk Notebook Evangelist

    Reputations:
    31
    Messages:
    595
    Likes Received:
    0
    Trophy Points:
    30
    Create a new Text File on your desktop with Notepad. Add these 2 lines:

    Attrib +h C:\*._* /s
    Exit

    Close the file, then rename it something like 'hide.bat' (the extension is important). Double clicking the file should hide all the files that are named " anything._ anything" on your C: drive. Substitute a specific directory or another drive if you prefer. The "/s" applies this to all files in the subdirectories of the one you specify. Use another file with a '-h' instead to unhide them.

    -Lee
     
  6. ngocthach1130

    ngocthach1130 Notebook Guru

    Reputations:
    0
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    15
    Lol great suggestion. I'll make note of this. It'll be a great prank to friends' computer. lol imagine hiding all .exe
     
  7. lmychajluk

    lmychajluk Notebook Evangelist

    Reputations:
    31
    Messages:
    595
    Likes Received:
    0
    Trophy Points:
    30
    I don't think that'll do anything. Hidden files are still accessable, so if you hide XYZ.EXE, and then go to Start/Run XYZ.EXE, or have a shortcut pointing at it, I think it will still run.

    My favorite 'prank' was that exe that you could drop in someone's startup folder that turned the screen upside down. ;)

    -Lee
     
  8. Spare Tire

    Spare Tire Notebook Evangelist

    Reputations:
    18
    Messages:
    459
    Likes Received:
    0
    Trophy Points:
    30
    Well yeah, why not just uncheck in the folder options the show hidden files. Those files will always be there. Even on your hdd, say if you open a word document, it will create a hidden temporary file.

    There was one time though that a folder containing msn explorer (which i never installed or asked for or anything, windows itself is a spyware i guess...) system files and stuff like the uninstall didn't show up even when the option to show hidden files and folders was on. But you could access the folder if you knew the location. Odd. Microsoft must be hidding lots of crap on our comps.
     
  9. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15
    Thanks very much for this amazingly useful piece of info! Good riddance useful files!!! Of note, I initially copied the info above by hand and neglected the space after the second asterisk. After running the process which was instantaneous (vs if you run the correct file as you wrote above, it takes about 10-15 seconds to complete) and rebooting, my Mcafee privacy service could not boot stating a component was missing. I noted my error and corrected it with -h and all was fixed... gladt it was that easy :eek: Thanks again for this tip, very helpful. The reason I don't keep all hidden files from being seen is that there is some pretty useful stuff there that is nice to have visible. The ._ files and .DS files are completely useless to me, so hiding them selectively is ideal.
     
  10. lmychajluk

    lmychajluk Notebook Evangelist

    Reputations:
    31
    Messages:
    595
    Likes Received:
    0
    Trophy Points:
    30
    To be on the safe side, I would use the name of the directory that you copy these files to instead of just C:\ (i.e. - C:\My Documents\*._*).

    I don't know if you realized it, but you could put more than one line in that text file, too...for example:
    Attrib +h C:\*._* /s
    Attrib +h C:\*.DS /s
    Exit

    Or, you could have seperate batch files (that's what these collections of command-line functions are called) to do each set, whatever works for you.
     
  11. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15

    Strange... when I specified the directory C:\Documents and Settings\MyName\My Documents, it does not work. It worked from the C drive settings, but not when I specified this folder. I know I typed it correctly, because I just did a copy and paste from the location bar right into the file. Any reason you can think of that performing this for a more specified location, as you suggest above, wouldn't work?
     
  12. j0hn00

    j0hn00 Notebook Evangelist

    Reputations:
    70
    Messages:
    394
    Likes Received:
    0
    Trophy Points:
    30
    Try

    C:\Documents and Settings\username\My Documents
     
  13. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15
    Actually, that is what I meant... I used my username where you describe above. Not working to remove the files. The .bat file, when run, seems to do nothing... in contrast to the same file, when run on C:\ takes about 10 seconds or so (presumably hiding the files) and then all those files disappear. Does the path with My Documents work for you?
     
  14. talkin73

    talkin73 Notebook Guru

    Reputations:
    0
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    15
    I'm concerned I may have goofed up something by using this command. Just weird system responses since doing it. Is there a command to reset them all back to their default?
     
  15. teacher24_70

    teacher24_70 Newbie

    Reputations:
    0
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    5
    I've been using this for my flashdrive for the past year. I just added another flashdrive that will often be plugged in at the same time, so I wanted to go back and edit my original "hide/unhide" .bat files. I changed then extension back to .txt, added additional lines to match my additional flashdrive, and saved again.

    I also realized that I can't seem to get my ".Trashes" folder to hide. It wasn't even hiding with the .bat file before I edited it for the new drive.

    Anyone have any idea why my others will hide, but .Trashes won't?

     
  16. lmychajluk

    lmychajluk Notebook Evangelist

    Reputations:
    31
    Messages:
    595
    Likes Received:
    0
    Trophy Points:
    30
    If there's a space somewhere in the path, you need to enclose the whole thing in double-qoutes. Ie:

    Attrib +h "C:\My Documents\*._*" /s

    I don't know why it wouldn't work with the '.trashes' directory....is that a Windows directory?
     
  17. teacher24_70

    teacher24_70 Newbie

    Reputations:
    0
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    5
    I thought I'd copy and paste what my hide file looks like at this point. Maybe that will help someone tell me why it's not hiding my ".Trashes" folder. Do I have to do something different since my ".Trashes" folder does not contain the underscore as the first line shows? Do I need to insert a line right before the Trashes line like: Attrib +h E:\*.* /s

    Attrib +h E:\*._* /s
    Attrib +h E:\*._.DS /s
    Attrib +h E:\*.DS_Store /s
    Attrib +h E:\*.Trashes /s
    Attrib +h G:\*._* /s
    Attrib +h G:\*._.DS /s
    Attrib +h G:\*.DS_Store /s
    Attrib +h G:\*.Trashes /s
    Exit

    Thanks for any help that you can give me. Before I read this thread last year and started using it, I'd never even used or heard of ".bat" files--I don't think they even exist on a Mac which is what I use at home.
     
  18. teacher24_70

    teacher24_70 Newbie

    Reputations:
    0
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    5
    It appears that we posted our last posts almost simultaneously. Hopefully, if you look at my previous post, maybe you can tell what's wrong. The "trashes" folder is in the first layer inside my flashdrive, so I'm not sure if there's a "space somewhere in the path" or not.

    I belive that the Trash folder appears because I've had it plugged into my Mac and then later plug it into my XP at work. I assumed that was why ALL of the usually hidden files were showing up. I thought that if I ONLY used my flashdrive on a Windows machine, that they were hidden all the time. But because I was sharing it across the two platforms, it confused the issue--usually those files contain information that is only evident on the Mac (window position, comments, permissions, etc.--or at least that's what I've heard.)

     
  19. lmychajluk

    lmychajluk Notebook Evangelist

    Reputations:
    31
    Messages:
    595
    Likes Received:
    0
    Trophy Points:
    30
    The way the bat file is set up, it looks like you're trying to hide all files with a 'Trashes' extension in the E: and G: drives. Are you saying Trashes is a folder? If so, try:
    Attrib +h E:\Trashes

    If that doesn't work - when your flashdrive is in the PC, can you right-click the Trashes folder, go to Properties, and choose 'Hidden'? (That's basically the same thing the Attrib command does.) Also, is it maybe marked as Read-Only (in which case you can use Attrib -R to clear the Read-Only flag first, then +H to hide it)?
     
  20. teacher24_70

    teacher24_70 Newbie

    Reputations:
    0
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    5
    Yes, ".Trashes" is a folder, but since it's preceded by "." it should be hidden already.

    I went to the properties of each one--while "read only" wasn't actually checkmarked/X'd, it was highlighted, so I clicked it to unhighlight it, then clicked that it should be hidden.

    This, in itself didn't hide it, but once I re-ran the .bat file, it did hide it.

    Thanks for the help. I really do appreciate these hints. Because unfortunately, almost every file on my flashdrive has the regular file "filename" and the "._filename" version. So this .bat file REALLY makes it much easier to find what you're looking for.

    Again, I'm sure that this is because the files have been on a Mac and the Mac saves information about each file in it's "._filename" file.
     
  21. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    A Unix system hides files by prepending a . to them. It's really just a convention, versus a real file tag. And Macs store copious amounts of metadata. I normally just nuke all that stuff. It eats up lots of storage space for data of dubious value ;)