China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-08 02:20
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to delete irregular folders with dots... View 2,932 Replies 16
Original Poster Posted 2008-04-03 16:25 ·  中国 广西 防城港 电信
中级用户
★★
海浪人生
Credits 206
Posts 103
Joined 2007-07-04 00:18
19-year member
UID 93068
Gender Male
Status Offline
A friend asked me how to delete folders with dots. I don't know how to do it. Let's ask. How to delete folders with dots? For example, dsfsdf.dd, daaad.dd, reter.dd. If it's a file, it's easy to handle, but how to search and delete such folders in the partition?
Floor 2 Posted 2008-04-03 16:53 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
Credits 2,278
Posts 1,020
Joined 2007-11-19 13:34
18-year member
UID 103127
Gender Male
Status Offline
Click the search under the signature
山外有山,人外有人;低调做人,努力做事。

进入网盘(各种工具)~~ 空间~~cmd学习
Floor 3 Posted 2008-04-03 17:44 ·  中国 广西 防城港 电信
中级用户
★★
海浪人生
Credits 206
Posts 103
Joined 2007-07-04 00:18
19-year member
UID 93068
Gender Male
Status Offline
Oh, I was really confused. Of course I've searched, but I couldn't find it, so I'm asking~ You didn't test it, so don't think it's easy.
Floor 4 Posted 2008-04-03 18:36 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
dsfsdf.dd daaad.dd reter.dd

The folder isn't irregular, right? You can delete it directly
Floor 5 Posted 2008-04-03 19:07 ·  中国 江苏 常州 电信
初级用户
Credits 26
Posts 13
Joined 2006-09-24 22:38
19-year member
UID 63566
Status Offline
The landlord goes to http://www.anqn.com/video/13/index.shtml to have a look
Floor 6 Posted 2008-04-03 19:22 ·  中国 江苏 常州 电信
初级用户
Credits 26
Posts 13
Joined 2006-09-24 22:38
19-year member
UID 63566
Status Offline
Methods to create hidden folders with dots
1. This is the "folder (directory) with dots" that was discussed the most in the previous period
It seems that the Dwarf Studio was the first to publicly use it, actually it has been around for a long time.
EXP:
Create: MD A..\
Delete: RD A..\ /s (Add the /s parameter if the folder is not empty)
The current known situation is:
. Such folders can be opened in the command line of XP, but not in 2000.
Floor 7 Posted 2008-04-03 20:34 ·  中国 广西 防城港 电信
中级用户
★★
海浪人生
Credits 206
Posts 103
Joined 2007-07-04 00:18
19-year member
UID 93068
Gender Male
Status Offline
“Dizzy~~ Deleting is not a problem~~ The hard part is to search for such folders~~ ~~~
1,000 or 10,000? Can't you ask me to delete manually?
The only rule is folders ending with.dd... . . . "Is this called getting angry? I said deleting 1,000 manually would be tiring? What about 10,000? All manual deletion?


Forget it~ ~
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------

::Delete malformed directories in the current path
for /f "delims=" %%a in ('dir/ad/b^|findstr /e "\."') do rd /q/s "%%a.\"
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------

::Delete malformed directories in the current path, including subdirectories
for /f "delims=" %%a in ('dir/ad/s/b^|findstr /e "\."') do rd /q/s "%%a.\"
-----------------------------------------------------------------

Delete empty malformed directories in the directory tree and display non-empty malformed directories
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------

for /f "delims=" %%a in ('dir/ad/s/b^|findstr /e "\."') do rd "%%a.\" 2>nul||echo %%a


This is your answer... Unfortunately, it doesn't work~ ~ Can't modify it~ ~


@echo off
for /l %%a in (0 1 50) do rd /q /s "%userporfile%\Desktop\%%a%%b..\" 2>nul
I know this is adding from 0 by 1 up to 50, deleting folders like 01.., 02..
But mine is not.., but.dd, and the front is not regular~ ~
I didn't get very angry...
But I hate not reading the question clearly and just answering to get points~ ~
I'd rather no one answers~ ~ I'd rather search for information by myself~ ~
Looking at the answers is根本 not what was asked... Even saying that manual deletion is okay.

Can ask for advice... Begging for help is out of the question·~ Won't kneel and beg. Naked begging~ ~
If the moderator sees that my tone is too excessive, you can deduct points and warn·~

[[i] Last edited by p1509101 on 2008-4-3 at 09:08 PM [/i]]
Floor 8 Posted 2008-04-03 20:39 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
Credits 2,278
Posts 1,020
Joined 2007-11-19 13:34
18-year member
UID 103127
Gender Male
Status Offline
Originally posted by p1509101 at 2008-4-3 08:34 PM:
Wow~ Deleting isn't the problem~ The hard part is finding such folders to delete~ ~ ~
1,000 or 10,000? You can't expect me to delete them manually, right?
The only pattern is folders ending with.dd...


Originally posted by p1509101 at 2008-4-3 05:44 PM:
Wow, I did search, but couldn't find them, so I'm asking~
Don't think it's easy if you haven't tested it


Please be mindful of your tone. You're seeking help from friends, so be grateful if someone can answer.

Please search for "bulk delete"!
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
Shinaterry -2 2008-04-03 23:41
山外有山,人外有人;低调做人,努力做事。

进入网盘(各种工具)~~ 空间~~cmd学习
Floor 9 Posted 2008-04-03 21:14 ·  中国 广西 防城港 电信
中级用户
★★
海浪人生
Credits 206
Posts 103
Joined 2007-07-04 00:18
19-year member
UID 93068
Gender Male
Status Offline
Asking is okay... Don't beg for help·~ Won't kneel and beg. Naked begging~~
If the moderator sees that my tone is too excessive, you can deduct points and give a warning·~
Besides, I'm also asking for someone else, not in a hurry to understand it for a while~~
Thank you to all the friends who answered~~
Don't reply to this post~~ Consider I didn't ask~~
Also, I hope you will read the question clearly before answering others' posts in the future. This is respect for others...
Floor 10 Posted 2008-04-03 21:23 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
Hehe, finally understand.

How to say, these folders are not irregular, you said the rule is to have.dd
Although I don't know how you check the files, but if you use dir for that,
folders are easy...

dir /s /b /d *.dd
Floor 11 Posted 2008-04-03 21:31 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
Credits 2,278
Posts 1,020
Joined 2007-11-19 13:34
18-year member
UID 103127
Gender Male
Status Offline
I'm sorry, I misunderstood.

Run the following code in the directory containing the.dd folder

@echo off
for /d %%a in (*.dd) do echo The following will be deleted %%a
pause


To delete, change echo to rd/a /q /s
Use with caution.
山外有山,人外有人;低调做人,努力做事。

进入网盘(各种工具)~~ 空间~~cmd学习
Floor 12 Posted 2008-04-03 21:39 ·  中国 福建 福州 连江县 电信
中级用户
★★
Credits 356
Posts 115
Joined 2004-07-27 00:00
22-year member
UID 29114
Gender Male
Status Offline
@echo off
for %%a in (c d e f g) do (
for /f "tokens=*" %%i in ('dir /s /ad /b %%a:\*.dd') do rd /s /q "%%i")
pause
Floor 13 Posted 2008-04-03 23:43 ·  中国 广东 珠海 电信
初级用户
★★
Credits 97
Posts 51
Joined 2008-03-19 15:26
18-year member
UID 113404
Gender Male
Status Offline
re: plp626

I'm sorry. I made a mistake by accident..
Floor 14 Posted 2008-04-04 10:13 ·  中国 广西 防城港 电信
中级用户
★★
海浪人生
Credits 206
Posts 103
Joined 2007-07-04 00:18
19-year member
UID 93068
Gender Male
Status Offline

Thank you, brother. It turns out to be /D ~~
At first, I used rd /s /q *.dd which didn't work~
Anyway, thank you all for your answers oh~~
Floor 15 Posted 2008-04-04 12:26 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
Note: d:\temp refers to the directory where folders with . are stored, please modify it correctly by yourself (use with caution!!!)
@echo off
for /f "delims=" %%i in ('dir /ad /b d:\temp ^| find "."') do (
rd /s /q d:\temp\%%i
)


[ Last edited by zw19750516 on 2008-4-4 at 12:28 PM ]
批处理之家新域名:www.bathome.net
Forum Jump: