Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to make folders attribute system by batch file

Featured Replies

hello dear friends :)

i need a simple batch command that makes the attributes of the folders inside a folder as system but i cant

do it since the folder dont have an extension. it must be something like "attrib +s *.folder" :) i know its

funny but this is all i can suggest :)

can you help me please ?

The 'attrib' cmd command supports defining a folder-name as target, but then wildcards isn't supported.

Also, there's switches for enabling recursiveness(/s) and for enabling the processing of folders additionally(/d).

Well, i've created such a batch as below a long time ago and i've been using this since then. (I believe i've edited some else package to be like this. Which? I don't recall)

I've removed some entries in order to make it a demo. I use this to remove read only attribute from folders i want. You can basically change the -R key to +S and edit the necessarry sections as you wish.

cWnd /HIDE @

cls

@echo off

goto top

Attrib1.bat

Program Files'da bulunan dosyalardaki "Salt Okunur" özelliğini kaldırır.

Nomadturk

:top

set name=top

if not %1()==() goto partial

attrib -R "%systemdrive%\program files\AIMP2\*.*" /S /D

goto top12

:top12

set name=top12

if not %1()==() goto partial

attrib -R "%systemdrive%\program files\Winrar\*.*" /S /D

goto top14

:top14

set name=top14

if not %1()==() goto partial

attrib -R "%systemdrive%\install\*.*" /S /D

goto end

:partial

set name=partial

attrib -R %1 /S /D

if %2()==() goto end

switch

:end

set name=end

exit

This one, is recursive.

you can use the /d switch

attrib /d /s +s c:\foldername\*.*

this will make all folders and files under c:\foldername +s

you can follow up with a attrib -s c:\foldername\*.* /s

this will remove s on only the files inside it

dunno if this was helpful at all since you probably dont want to mess with the files :)

Well, mine is recursive. That's why it's many more lines. But i remember /d not working for me.

(:

Darksimoon, if all you need is to change the attributes of some known files, than you'ld better use just this code:

attrib +s X:\Path\filename1.ext

attrib +s X:\Path\filename2.ext

...

attrib +s X:\Path\filenameX.ext

If not, give the others a try.

Edited by nomadturk

  • Author

hello friends ;

thank you very much for your replies.

@ nomadturk i wanted to try your codes however it seemed to me a little complicated. yet thank you very much for your reply.

@KingAFW your solution worked for me and it's easy. thank you very much. Here are the lines i used;

attrib +s "D:\userxpsettings\Desktop\New Folder\*.* " /S /D

attrib -s "D:\userxpsettings\Desktop\New Folder\*.* " /S

1st line attributes all the FILES and FOLDERS +S and the 2nd line removes S attribute from FILES and the result is only the folders are +S attributed. :)

Glad to be of help :)

Gonna be a problem if you have system files in there though :) Dunno how to get around that.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.