|
Auto
初级用户
 
积分 64
发帖 27
注册 2007-3-8
状态 离线
|
『楼 主』:
[已解决的问题]去掉隐藏文件夹隐藏属性的批处理
使用 LLM 解释/回答一下
求显示隐藏文件夹的批处理
近期U盘老是中毒 导致里面的文件夹都被隐藏了
怎么用个批处理去掉这些文件夹的隐藏属性..
顺便给点解释 本人批处理学了一点点 但很菜..
Last edited by Auto on 2008-5-17 at 09:46 AM ]
Seek batch scripts to display hidden folders
Recently, the USB flash drive has been frequently infected by viruses, causing all the folders inside to be hidden.
How to use a batch script to remove the hidden attributes of these folders..
By the way, give some explanations. I have learned a little about batch processing, but I'm very novice..
Last edited by Auto on 2008-5-17 at 09:46 AM ]
|
|
2008-5-15 17:33 |
|
|
pooronce
中级用户
  
积分 484
发帖 250
注册 2007-6-5
状态 离线
|
|
2008-5-15 19:21 |
|
|
Auto
初级用户
 
积分 64
发帖 27
注册 2007-3-8
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by pooronce at 2008-5-15 07:21 PM:
dir /a
attrib -s -h -r
这个我知道 比较麻烦
想要个自动化程度高的批处理
能够一运行就把当前目录下所有隐藏文件夹都给显示出来
Originally posted by pooronce at 2008-5-15 07:21 PM:
dir /a
attrib -s -h -r
I know this is relatively troublesome. I want a batch processing with high automation level that can display all hidden folders in the current directory as soon as it runs
|
|
2008-5-15 19:27 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
不是文件夹被隐藏了,而是注册表被修改了。
将以下代码保存为ShowAll.reg,双击导入注册表即可查看隐藏文件。
Windows Registry Editor Version 5.00
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30501"
"Type"="radio"
"CheckedValue"=dword:00000002
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51104"
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30500"
"Type"="radio"
"CheckedValue"=dword:00000001
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51105"
"Type"="checkbox"
"Text"="@shell32.dll,-30508"
"WarningIfNotDefault"="@shell32.dll,-28964"
"HKeyRoot"=dword:80000001
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"ValueName"="ShowSuperHidden"
"CheckedValue"=dword:00000000
"UncheckedValue"=dword:00000001
"DefaultValue"=dword:00000000
"HelpID"="shell.hlp#51103"
It's not that the folder is hidden, but that the registry has been modified.
Save the following code as ShowAll.reg, and double-click to import the registry to view hidden files.
Windows Registry Editor Version 5.00
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30501"
"Type"="radio"
"CheckedValue"=dword:00000002
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51104"
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30500"
"Type"="radio"
"CheckedValue"=dword:00000001
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51105"
"Type"="checkbox"
"Text"="@shell32.dll,-30508"
"WarningIfNotDefault"="@shell32.dll,-28964"
"HKeyRoot"=dword:80000001
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"ValueName"="ShowSuperHidden"
"CheckedValue"=dword:00000000
"UncheckedValue"=dword:00000001
"DefaultValue"=dword:00000000
"HelpID"="shell.hlp#51103"
|

 |
|
2008-5-15 19:35 |
|
|
Auto
初级用户
 
积分 64
发帖 27
注册 2007-3-8
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
我想要去掉这些文件夹的隐藏属性啊..
继续求助
还是谢谢楼上的
I want to remove the hidden attributes of these folders..
Continue to ask for help
Still thank you to the above
|
|
2008-5-16 15:10 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by Auto at 2008-5-16 03:10 PM:
我想要去掉这些文件夹的隐藏属性啊..
继续求助
还是谢谢楼上的
@echo off
set SrcDir=C:\test
for /f "tokens=1* delims=" %%a in ('dir /s /b /ad "%SrcDir%"') do (
attrib -h -s -a -r "%SrcDir%\%%a"
)
Originally posted by Auto at 2008-5-16 03:10 PM:
I want to remove the hidden attributes of these folders..
Continue to ask for help
Still thank you upstairs
@echo off
set SrcDir=C:\test
for /f "tokens=1* delims=" %%a in ('dir /s /b /ad "%SrcDir%"') do (
attrib -h -s -a -r "%SrcDir%\%%a"
)
|

 |
|
2008-5-16 15:16 |
|
|
knoppix7
银牌会员
    
积分 1287
发帖 634
注册 2007-5-2 来自 cmd.exe
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
dir /AHD /s /b
然后参照LS的代码加FOR
dir /AHD /s /b
Then refer to LS's code and add FOR
|
|
2008-5-16 22:53 |
|
|
Auto
初级用户
 
积分 64
发帖 27
注册 2007-3-8
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
@echo off
set SrcDir=D:\Tools\test
for /f "tokens=1* delims=" %%a in ('dir /AHD /s /b "%SrcDir%"') do (
attrib -h -s -a -r "%SrcDir%\%%a"
)
pause
我运行上面那个 出现下面的提示
找不到路径 - D:\Tools\test\D:\Tools\test
找不到路径 - D:\Tools\test\D:\Tools\test
找不到路径 - D:\Tools\test\D:\Tools\test
找不到路径 - D:\Tools\test\D:\Tools\test
请按任意键继续. . .
经摸索 才发现..
dir那句应该要去掉/s这个参数..
还求某位来改进一下
就是把这个批处理放到那个文件夹下 运行后就能去掉当前文件夹里的隐藏文件夹的隐藏属性
就是怎么把变量SrcDir的值换成当前路径..
Last edited by Auto on 2008-5-17 at 09:29 AM ]
@echo off
set SrcDir=D:\Tools\test
for /f "tokens=1* delims=" %%a in ('dir /AHD /s /b "%SrcDir%"') do (
attrib -h -s -a -r "%SrcDir%\%%a"
)
pause
I ran the above and got the following prompt
The system cannot find the path - D:\Tools\test\D:\Tools\test
The system cannot find the path - D:\Tools\test\D:\Tools\test
The system cannot find the path - D:\Tools\test\D:\Tools\test
The system cannot find the path - D:\Tools\test\D:\Tools\test
Press any key to continue . . .
After摸索, I just found out..
The /s parameter in the dir sentence should be removed..
Also, I need someone to improve it
That is, put this batch file in that folder and run it to remove the hidden attribute of the hidden folders in the current folder
That is, how to replace the value of the variable SrcDir with the current path..
Last edited by Auto on 2008-5-17 at 09:29 AM ]
|
|
2008-5-17 09:27 |
|
|
Auto
初级用户
 
积分 64
发帖 27
注册 2007-3-8
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
经上面各位的指导和本人的摸索
我要的批处理应该这样吧
:: 去掉当前文件夹里子文件夹的隐藏属性
@echo off
for /f "tokens=1* delims=" %%a in ('dir /adh /b') do (
attrib -h -s -a -r ".\%%a"
)
谢谢上面各位仁兄.
Last edited by Auto on 2008-5-17 at 09:46 AM ]
Through the guidance of the above - mentioned各位 and my own exploration, the batch processing I need should be like this:
:: Remove the hidden attribute of sub - folders in the current folder
@echo off
for /f "tokens=1* delims=" %%a in ('dir /adh /b') do (
attrib -h -s -a -r ".\%%a"
)
Thank you, above - mentioned各位 brothers.
Last edited by Auto on 2008 - 5 - 17 at 09:46 AM ]
|
|
2008-5-17 09:44 |
|
|
cisheng97
初级用户
 
积分 31
发帖 24
注册 2009-4-4
状态 离线
|
|
2009-12-16 00:26 |
|
|
jarry0932
初级用户
 
积分 128
发帖 122
注册 2009-9-21
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
先用4楼的,把注册表改好,显示出所有的隐藏文件及系统文件,再直接把隐藏的文件拖到这个批处理上:
attrib -s -h %1
简单明了
First, use the one from floor 4, modify the registry to show all hidden files and system files, then directly drag the hidden file onto this batch processing:
attrib -s -h %1
Simple and clear
|
|
2009-12-16 01:44 |
|
|
cisheng97
初级用户
 
积分 31
发帖 24
注册 2009-4-4
状态 离线
|
|
2009-12-16 21:19 |
|