How to prevent .DS_Store files in specificied folders

Hello.  I want to stop creation of .DS_Store files in Desktop and Picture/hoge folders only. Also I would like to keep its settings of .DS_Store files in other folders.  When I googled the web I found so many pages explaining how to prevent .DS_Store in network folders, how to stop creation of .DS_Store files in all of the OSX system and usage of TotalFinder. Those are not what I am finding for. I want to stop creation of .DS_Store files in only particular folders.  I can use AppleScript or Terminal commands.  Thank you very much.

would creating an empty one, then locking it achieve what you need ?
+ locking existing ones as needed.
briefly checking here causes no obvious problems, Finder still alows changes, but reverted after relaunch.

Similar Messages

  • How to prevent users from creating new folders in share folder directory?

    Hello guys
    I'd like to know How to prevent users from creating new folders in share folder directory but still keep their power of creating new folders in their personal 'my folder'?
    I tried changing the 'manage privilage ---- create folder' to deny certain user accounts, but by doing so, it also stops the user from creating new folders in their 'my folder', which is not good..
    I also tried going into these share folders and tried different access types such as 'change/delete', 'read', 'traverse folder' etc, but none of it work ideally. The 'change/delete' access still allows them to create new folders, 'read' access prevents creating new folders but also take away their power of saving reports..
    Any thoughts on how to take away their ability to ONLY create new folders in share folder areas without affecting their other privileges?
    Please advise
    Thank you

    Easy, on the shared folders root folder only give them 'read' or 'traverse folder' but on the the folder inside the shared folders root folder give them 'change/delete'. That means they can change anything inside those folders but not create any folders at the shared folders root level.

  • How to prevent excutable files run in the DOCUMENT_ROOT

    How to prevent excutable files run in the DOCUMENT_ROOT of the apache server?
    I just want it to run in /var/www/cgi-bin but not /var/www/html
    As far as I know, there is a module called SELinux in Fedora Core to protect the DOCUMENT_ROOT.

    I guess i just dont get it. chalk it up to a language barrier, or me not understanding...
    if you script is not executable (noexecute setting in apache, not in filesystem) then it shouldn't matter..
    if you do want at to be execute, but just want to control "where" it executes, you might consider running a chroot or something early in the script.
    and for gods sake..dont allow user input to ever determine a path or filename directly...
    /me shivvers

  • How to prevent a file from stripping?

    I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
    # $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
    # Maintainer: dale <[email protected]>
    pkgname=vacation
    pkgver=1.2.6.1
    pkgrel=1
    pkgdesc="an automatic mail-answering program"
    depends=(gdbm)
    url="http://www.tosn.org/projects/vacation/"
    source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
    build() {
    cd $startdir/src/$pkgname
    mkdir -p $startdir/pkg/usr/{bin,man/man1}
    # keeps binary from building
    rm -rf vacation
    # fixing the Makefile - not only for arch64
    sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
    sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
    mv vacation.man vacation.1
    make install
    These file have been created:
    [andyrtr@workstation64 vacation]$ ls -lRA pkg/
    pkg/:
    insgesamt 0
    drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
    pkg/usr:
    insgesamt 0
    drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
    drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
    pkg/usr/bin:
    insgesamt 24
    -rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
    -rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
    pkg/usr/man:
    insgesamt 0
    drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
    pkg/usr/man/man1:
    insgesamt 0
    [andyrtr@workstation64 vacation]$
    I get this error:
    ==> Starting build()...
    gcc -march=x86-64 -O2 -pipe  -Wall  -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
    install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
    install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
    strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
    install: strip fehlgeschlagen
    make: *** [install] Fehler 1
    ==> ERROR: Build Failed.  Aborting...
    Krusader detects it as a Perl program. Any idea?
    AndyRTR

    Posted: Sat Jan 28, 2006 8:45 am    Post subject: How to prevent a file from stripping?
    I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
    Code:
    # $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
    # Maintainer: dale <[email protected]>
    pkgname=vacation
    pkgver=1.2.6.1
    pkgrel=1
    pkgdesc="an automatic mail-answering program"
    depends=(gdbm)
    url="http://www.tosn.org/projects/vacation/"
    source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
    build() {
       cd $startdir/src/$pkgname
            mkdir -p $startdir/pkg/usr/{bin,man/man1}
            # keeps binary from building
            rm -rf vacation
       # fixing the Makefile - not only for arch64
       sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
       sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
       mv vacation.man vacation.1
       make install
    These file have been created:
    Code:
    [andyrtr@workstation64 vacation]$ ls -lRA pkg/
    pkg/:
    insgesamt 0
    drwxr-xr-x  4 andyrtr users 96 2006-01-28 09:32 usr
    pkg/usr:
    insgesamt 0
    drwxr-xr-x  2 andyrtr users 96 2006-01-28 09:32 bin
    drwxr-xr-x  3 andyrtr users 72 2006-01-28 09:32 man
    pkg/usr/bin:
    insgesamt 24
    -rwxr-xr-x  1 andyrtr users 16864 2006-01-28 09:32 vacation
    -rw-------  1 andyrtr users   470 2006-01-28 09:32 vaclook
    pkg/usr/man:
    insgesamt 0
    drwxr-xr-x  2 andyrtr users 48 2006-01-28 09:32 man1
    pkg/usr/man/man1:
    insgesamt 0
    [andyrtr@workstation64 vacation]$
    I get this error:
    ==> Starting build()...
    gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
    install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
    install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
    strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
    install: strip fehlgeschlagen
    make: *** [install] Fehler 1
    ==> ERROR: Build Failed. Aborting...
    Looks like its tring to install to /var/abs/extra/system/vacation/pkg/usr/bin....... ????
    try make DESTDIR=$startdir/pkg/usr install

  • How do I prevent .DS_Store file creation on external usb drives?

    Hi.
    I can't connect my friends or colleagues external drives to my computer without my Mac creating dozens of ".DS_Store" files on them. It is very annoying.
    How can I prevent the Mac from creating these ".DS_Store" files?
    Thanks :o)

    Thanks for the response :o)
    If I suddenly would realize that my car is leaking oil, I would not buy a machine which automatically would fill up my oil tank to a acceptable level and also wipe up the oil after me. I would of course fix my car instead.
    I want to take the problem by the root. It should be possible to turn the feature off, so that the files never will be created (and without mounting the filesystem as read-only).
    Where can I turn off this feature?

  • Prevent .DS_Store Files From Re-appearing

    I'm trying to upload a custom WordPress theme to:
    - http://wordpress.org/themes/upload/
    However it won't let me because of the hidden .DS_Store files inside it.
    I've tried removing them with the Terminal command:
    - find . -name '*.DS_Store' -type f -delete
    However they seem to reappear for when I upload them? Is there a way I can prevent them from reappearing before I upload the file?

    Did you have open Finder windows that regenerate them?
    They are required by OSX as far as I know. When I SVN commit, I explicitely have to exclude them as well.
    More info/solution in the rant at http://www.aorensoftware.com/blog/2011/12/24/death-to-ds_store/.

  • How to prevent overring files

    Hi All,
    I wrote a programe to copy files in different folders to a specific destination folder. But the problem is if we have 2 files with same name it override the old file. Can any one help me to solve this.
    Thanks in Advance.

    Just now I came up with a solution. Every time when I am coping, end of each file i concat the name of the source folder. Then in destination every file is uniqe. Thanks for ur time.

  • How to prevent swf files being downloaded

    People,
    I'm a teacher and I have some animations made in flash language (swf). I would like to publish these animations on my web site so my students could see, but I wonder if there is any way to prevent these animations being downloaded.
    Example: when I see an animation published on my web site, this animation is stored in Internet Temporary Files and I can save this animation anywhere. How can I prevent an animation is stored in the temporary folder? In other words, this animation can only be seen if the user is logged on the site.
    Urgent!!!
    Thanks.
    Alyson

    I think that's what I want. I found a site that has exactly what I need. It
    is done this way too?
    Plese take a look at http://www.edumedia-sciences.com/en/a559-scintigraphy
    <http://www.edumedia-sciences.com/>
    Thanks
    2009/11/16 moccamaximum <[email protected]>
    You could implement a kind of time-barrier, like in the trial versions you
    download from softwarecompanys.
    For the most users, that are not understanding actionscript and know how to
    read the code, even if they decompile it, that would prevent the swf being
    played after a certain date that you would have to implement in your code.
    In AS2 the code would be like this:
    >
    var now:Date = new Date(); //reads the user system date
    var release:Date = new Date(2009, 11, 16); //here goes the date, when you
    want to have the program deactivated
    >
    if(now <= release){
       playSwf(); // here goes your normal code
    >
    else{
       doNothing();
    >
    Like the most TimeBarriers this could be easily circumvented if the user
    sets back his system date, so do not give a message like "You trial period
    has expired"
    >

  • How to extract all files from several folders?

    I want to extract all the files from about 20 folders
    Is there a simple way to do this ?

    my computer was recently formated and I lost all my itunes library. I had all my music on my ipod, but I couldn't sync it, so I had to google for a backup to itunes program. I found copytrans and was very surprised to see how easy it was! I thought I had to do the whole thing from scratch! I just love this app!

  • Acrobat 8: How to prevent "Combine Files" from adding a header?

    Hi All.
    I am using Acrobat 8 (Win XP SP II) and am having a problem with the "Combine Files" feature. In the past, I've used this function to create hundreds of PDF files from thousands of individiual PDF's. It worked great. But now, suddenly, Acrobat increases the landscape page height from 8.5 to 8.8 inches, and then adds a header containing document name and date info.
    I don't want this header. I've looked all over Acrobat and Distiller and converter preferences but can't seem to find how to shut this feature off. Can anyone help me?
    To see an example, go to:
    http://www.garywed.com/AcroProblem.jpg
    Many Thanks!
    Gary Wedemayer

    I have multiple single-page PDF files lying in a folder; I hit Files-->Combine Files, select the relevant PDF files, and let it rip using any of the quality settings (low, medium, high- makes no difference).
    But I see nothing in the Combine Files dialog box that is relevant to this kind of header, so it must be hidden somewhere else. Can't find it for the life of me, tho!
    If I have to I'll revert back to Acrobat 6.0 or write a Javascript to combine the files for me, but I know I can do it straight up in Acrobat 8 'cos I've done it many times before.
    Thanx.
    ---Gary Wedemayer

  • How do I move files in to folders?

    I just want to manage my files in folders on the cloud

    Hi THarders,
    After you log into http://files.acrobat.com, you can click the 'New Folder' button from the top-right corner to create a folder.
    Mark the checkboxes next to the files you'd like to put in the folder, then click the 'Move Files' button.
    It's that easy!
    Please let us know if you have any questions!
    -David

  • How to prevent copy files

    I make ntfs permission read only to users to view files only but i want to prevent them from take copy of these files outside this shared folder to their own pc 

    Hi,
    I'm afraid it is impossible. If User have permission to read, you cannot stop them from copying files. 
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to move certain files to certain folders?

    I am trying to speed up Re-Labeling all my metadata for every song in my library. Basically I need to create a workflow first, but I am having some troubles on how I should be doing it in Automater. I will explain what I need and hopefully someone could help me create a workflow to make it happen.
    =============
    Example filename: "forrestaveryderty_driftinonby_flapjack.m4a"
    find all filenames that start with the same word before the First underscore (_)
    create a folder with that same word
    copy files with the same word (BEFORE THE FIRST UNDERSCORE) to their corresponding folder name
    I then can use Media Rage to select the certain folder and and change the artist name all at once.
    and I would like it to do that with every file at one time.
    again...
    1: Find files with the same name before the first "underscore"
    2: Create a a folder for every different name found (before the first underscore)
    3: Copy found files (with same name before the first underscore) to the folder with the same name

    This would be easy to do in iTunes. Find all the songs you want to change using search or smart albums or the browser. Select them all. Get Info (Command-I). Enter the new metadata. All the selected songs will be changed at once.
    There are also a number of Applescripts available to facilitate metadata editing. See, for example, Doug's Applescripts.

  • How can I restore files stored in folders outside of a home directory

    I recently replaced the hard drive on my MacBook Pro running OS X 10.9.3.  After I had re-installed the OS and created a dummy account, I used my time machine backups to restore all profiles on the machine.  This brought most but not all data I had on the machine.  While this is not something that will occur often I would like to avoid this problem in the future.  I had installed Mysql and I had one instance with data stored within.  After I had restored all of my profiles, I could not start the database instance.  I was forced to re-install the application, recreate the database instance, and re-insert the data.
    I had made sure that I had backed up my data a couple of days before I replaced the drive so I thought I was save to proceed.  I have looked at the time machine preferences and there is no place for me to specify what directories to include in the backups only what to exclude.  This leads me to believe that the data in question was backedup.  I just was unable to restore it.  After I had it all working again, I was able to figure out that the data was located at "/usr/local/mysql/data/instace_name".
    As I said before, this problem was generated when I replaced the hard drive.  I replaced it with an SSD.  For that reason, I know that I will go through this problem at a later date.  I just want to be proactive and plan for the failure of the SSD.
    Thank you
    Javier Salazar

    I don't see why transferring the user account using Transfer Assistant at the time of the installation, would not have brought the information across.  It could be that making a "dummy account" has led to having a different user account number from the original account, with consequential access problems.  It is a problem met when using Migration Assistant after the initial install.
    Pondini was the expert on all things to do with Time Machine.  Here is an article from his guide on transferring data.
    http://pondini.org/OSX/Transfer.html

  • How to permanently stop creation of .DS_Store files on desktop?

    Ever since attempting to use .ds_store on Terminal to find hidden iTunes files, the system will not stop creating .DS_Store files on the desktop. I've tried using the defaults write com.apple.desktopservices DSDontWriteNetworkStores true command, to no avail. I'm relatively new to using Terminal, so if someone could offer any tips, that would be good. The file creation is more of an annoyance than a real problem, but I want to know how to stop it, since there is no info on this in other places. Thanks! ~ Eva

    The DSDontWriteNetworkStores command only prevents creation on shared network drives.
    .DS_Store files are always created locally (unless using something like TotalFinder to prevent that)
    The reason you now see them on the Desktop is likely because during the process to track down iTunes files you enabled the option to "see" hidden files - issue the following command in Terminal to "undo" that:
    defaults write com.apple.finder AppleShowAllFiles false
    If you want the change to be immediate (rather than after logging out & back in or rebooting) then simply "restart" the Finder app, again in Terminal:
    killall Finder
    Johnny.

Maybe you are looking for