中国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-08-08 22:11
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » The meaning of \\?\%1 is: The \\?\ is a prefix used in the Windows long path syntax. It allows paths longer than the traditional 260 - character limit. %1 is a placeholder for the first command - line argument passed to the batch script. So overall, this part is used to represent a path that can potentially be a long path and is taking the first argument as that path for the `rd /s/q` (remove directory / silent / quiet) operation.
Printable Version  5,465 / 16
Floor1 ggyy66 Posted 2008-06-01 01:13
初级用户 Posts 69 Credits 173
What does \\?\%1 mean at the end?
-------------------------------------------------------------------
The following two lines of commands are commands in two batch files, which are used to delete files.
rd /s/q \\?\%1
del /f/a/q \\?\%1
--------------------------------
Please advise, what does \\?\%1 mean at the end?
Floor2 bat-zw Posted 2008-06-01 01:37
金牌会员 Posts 1,276 Credits 3,105
\\?\ refers to any path
%1 is the file you want to delete
Floor3 HAT Posted 2008-06-01 10:56
版主 Posts 5,017 Credits 9,023
Originally posted by zw19750516 at 2008-6-1 01:37 AM:
\\?\ refers to any path
%1 is the file you want to delete

Can you introduce the difference between the two:
rd /s/q \\?\%1
rd /s/q %1
Floor4 andison625 Posted 2008-06-01 11:01
初级用户 Posts 36 Credits 70
rd /s/q \\?\%1 This is similar to format..
rd /s/q %1 This deletes the directory of %1
Floor5 cad55 Posted 2008-06-01 11:10
高级用户 Posts 329 Credits 620
This command is really powerful........

Deleting files is relatively fast........
Floor6 HAT Posted 2008-06-01 11:15
版主 Posts 5,017 Credits 9,023
Originally posted by andison625 at 2008-6-1 11:01 AM:
rd /s/q \\?\%1 This seems similar to format..
rd /s/q %1 This deletes the directory of %1

But I really can't see where it is similar to format. Can you explain it?

Floor7 andison625 Posted 2008-06-01 11:30
初级用户 Posts 36 Credits 70
Swe sweat......

rd /s/q seems to be deleting the specified folder

? If it refers to all folders under the root directory?

rs /s/q \\?\ Is it the same as format?
Floor8 ggyy66 Posted 2008-06-01 14:18
初级用户 Posts 69 Credits 173
Can you introduce the difference between the two:

rd /s/q \\?\%1

rd /s/q %1

-------------------------------

What is the difference between \\?\%1 and %1?
Floor9 5872169 Posted 2008-06-01 18:53
高级用户 Posts 474 Credits 959
Can anyone explain in detail the meaning of all the commands??
Floor10 joyn Posted 2008-06-01 19:26
中级用户 Posts 105 Credits 280 From 广西
Can't delete anything at all.....
Still can rd /S /Q %1

[ Last edited by joyn on 2008-6-1 at 07:28 PM ]
Floor11 gsrj Posted 2008-06-01 23:15
新手上路 Posts 5 Credits 10
Hehe, new users can't understand very well
Floor12 ggyy66 Posted 2008-06-02 08:08
初级用户 Posts 69 Credits 173
Still don't understand, could the elder explain it?
Floor13 liyyhh Posted 2008-06-02 13:56
初级用户 Posts 27 Credits 48
I don't understand, still don't understand, is there no professional person to explain it?
Floor14 pusofalse Posted 2008-06-02 14:41
银牌会员 Posts 646 Credits 1,604
%1 The first parameter of the batch processing %2 The second parameter
Create a new batch processing named 1.bat
net user %1 %2 /add
Then open CMD and enter 1.bat 1234 123
Then a user with username 1234 and password 123 is created~
I think this is the most straightforward explanation~
Floor15 ggyy66 Posted 2008-06-02 17:29
初级用户 Posts 69 Credits 173
What does \\?\ mean?
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023