中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-11-24 00:30
47,820 topics / 349,938 posts / today 0 new / 48,298 members
DOS批处理 & 脚本技术(批处理室) » Experts, please help look at this batch file for an undeletable folder
Printable Version  6,213 / 46
Floor31 fastslz Posted 2008-06-28 19:15
铂金会员 Posts 2,315 Credits 5,493 From 上海
Supplement
Replace start "" D:\TMP\sm..\ in the code with start "" "%CurDir%sm..\"
Floor32 philon Posted 2008-06-28 20:04
初级用户 Posts 19 Credits 42
The previous poster, I tested 复制.cmd, and it still didn't copy the empty folder into sm..\

[ Last edited by philon on 2008-6-28 at 08:24 PM ]
Floor33 HAT Posted 2008-06-28 20:46
版主 Posts 5,017 Credits 9,023
Even /e doesn't work?

/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
Floor34 philon Posted 2008-06-28 20:49
初级用户 Posts 19 Credits 42
That's right. After adding /e, it still didn't copy over, and it also gave a cannot perform cyclic copy prompt. Only non-empty directories and the files inside them were copied over; the files in the current directory weren't copied over at all
Floor35 fastslz Posted 2008-06-28 21:00
铂金会员 Posts 2,315 Credits 5,493 From 上海
Floor36 philon Posted 2008-06-28 21:22
初级用户 Posts 19 Credits 42
fastslz
You really are an expert, thank you very much! This time it worked. It achieved what I had in mind! Thanks again~
I changed cls&echo Copying file "%~1" ...... to cls&echo Copying file ......
Haha
Floor37 xypcmac Posted 2008-06-28 21:31
初级用户 Posts 80 Credits 167
Originally posted by HAT at 2008-6-28 17:34:
Add a fox loop to exclude sm..\, then use xcopy /i, maybe it can be done. Going to eat first, we'll discuss it again when I get back.


You could also first copy the files and folders that need to go into the “sm.” folder to somewhere else, and then copy them back.
Floor38 fastslz Posted 2008-06-28 22:08
铂金会员 Posts 2,315 Credits 5,493 From 上海
Originally posted by philon at 2008-6-28 21:22:

I changed cls&echo Copying file "%~1" ...... to cls&echo Copying file ......
Haha

Floor39 philon Posted 2008-06-28 22:49
初级用户 Posts 19 Credits 42
One more question: after using your code, I can't change the name of the folder to be created? Can't sm be changed to another name? For example wd, or simply private folder? Is it related to that 6b7e~1 thing? What is it used for? Waiting for your reply.
Floor40 HAT Posted 2008-06-28 23:40
版主 Posts 5,017 Credits 9,023
Come on, you still haven't figured out where sm6b7e~1 comes from?
Post #12 explained it very clearly, dir /x
Floor41 xypcmac Posted 2008-06-28 23:44
初级用户 Posts 80 Credits 167
Look at the picture:


Floor42 philon Posted 2008-06-28 23:48
初级用户 Posts 19 Credits 42
Yeah, it's just that there's no way to change sm to another name.
Floor43 fastslz Posted 2008-06-28 23:52
铂金会员 Posts 2,315 Credits 5,493 From 上海


When the Name variable is undefined or defined as space characters, rd /s/q %Name%..\ will delete all folders in the parent directory. Any loss has nothing to do with me, so please do not casually modify the code
Floor44 quya Posted 2008-06-28 23:53
高级用户 Posts 172 Credits 558 From 江苏
Actually, this kind of folder is also easy to delete, so it can't really be called a private folder.

Because just like post #12 said, dir/x shows everything.

For example, with md g..\ you can actually cd ge276~1, and then do whatever you want. Same principle as sm6b7e~1
Floor45 philon Posted 2008-06-29 01:15
初级用户 Posts 19 Credits 42
Prev  1 2 3 4  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023