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-06-22 17:14
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Discussion] How does OneKey Ghost create a deeply hidden folder like ~1? View 14,070 Replies 63
Original Poster Posted 2007-04-12 06:18 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
I am very noob, really can't understand how the one - key ghost of站长 Ge from DOS Home creates a ~1 such deeply hidden folder. After running one - key ghost, a ~1 folder will be established in the last hard disk partition. It is established under DOS, and the backup file C_pan.gho is stored here. In WINXP, by running F:\~1\, you can see it, or in CMD, input dir/a F:\~1\ to access this folder and see the system - hidden C_pan.gho file. I would like to ask you all, how is this deeply hidden folder created under DOS?

The methods I have seen before to create some hidden and non - deletable folders under WINXP, such as:

md c:\...\

md c:\123..\

md "c:\ \ "

md "c:\123 \ "

md "c:\ "

etc. are all not usable under DOS, and the first one is also not usable under NTFS format.

If directly create md F:\~1 under DOS and add the system hidden attribute, in WINXP it can be seen, and it cannot be deeply hidden.

[ Last edited by lp1129 on 2007 - 4 - 12 at 12:00 AM ]
Floor 2 Posted 2007-04-12 09:41 ·  中国 湖南 长沙 雨花区 电信
新手上路
Credits 6
Posts 3
Joined 2007-04-08 05:07
19-year member
UID 84352
Gender Male
Status Offline
It's quite strange.
I can see this C-PAN.GHO from the DOS command line.
But I can't see it from the local disk.
Even using the attrib -s -h command, there's no result at all.
Floor 3 Posted 2007-04-12 10:53 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
Searched many places and found a way to see the one-key recovery backup file C-PAN.GHO.

First, display all files, including system-hidden ones.

Create a ~1. folder in cmd, for example:

F:\>md ~1..\

Open this folder to see the backup file.

Delete the ~1. folder to hide it again.

F:\>rd ~1..\

The backup file C-PAN.GHO will not be deleted.

Now I want to ask how this ~1 folder is created under DOS.
Floor 4 Posted 2007-04-12 10:56 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
Below is the batch module I wrote for creating multi-level, long-filename directories in a DOS game running system

(Conditions: Have FIND, GET, may also need DOSLFN,
Also there are a few WBATs. If you don't use WBAT, just remove them and related parts)

Usage:
set enddir=The directory you want
call multidir.bat

********************************
multidir.bat

@echo off

:start
set lfn=%enddir%

dir "%lfn%" /w/ad|find /i "%lfn%" >nul
if not errorlevel 1 goto final

md "%lfn%" >nul

dir "%lfn%" /w/ad|find /i "%lfn%" >nul
if not errorlevel 1 goto ok

set pos=
set left=%lfn%
set right=

:toleft
get # "%left%" '\' /x >nul
set pos=%get%
get z "%lfn%" %pos% >nul
set right=%get%
get r "-" %pos% /w1 >nul
get z "%left%" /w%get% >nul
set left=%get%

dir "%left%" /w/ad|find /i "%left%" >nul
if not errorlevel 1 goto toright
goto toleft

:toright
if "%right%"=="" goto end
get # "%right%" '\' >nul
if "%get%"=="0" goto last
get r "+" %pos% /w%get% >nul
set pos=%get%
get r "-" %pos% /w1 >nul
get z "%lfn%" /w%get% >nul
set left=%get%
get z "%lfn%" %pos% >nul
set right=%get%

md "%left%" >nul
dir "%left%" /w/ad|find /i "%left%" >nul
if not errorlevel 1 goto toright
set lfn=%left%
goto fail

:last
md "%lfn%" >nul

:end
dir "%lfn%" /w/ad|find /i "%lfn%" >nul
if not errorlevel 1 goto ok

:fail
wbat box "Directory creation failed! ^%lfn%" Retry, Return
if errorlevel 2 goto final
goto start

:ok
wbat box "Directory creation successful! ^%lfn%" Continue...

:final
Floor 5 Posted 2007-04-12 11:22 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
The master upstairs, but you may have a little misunderstanding of my meaning.

I don't want to create other directories.

Just a directory like one-click restore ~1, such as:

F:\~1\

This kind of directory, which is required to be created under DOS and is not visible under WINXP, and it stores GHO backup files.
Floor 6 Posted 2007-04-12 11:41 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
Oh,
But, the deep directory means multi-layer directories

Then I'll take a look at what's going on..
Floor 7 Posted 2007-04-12 13:19 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
I looked at the MDD.bat of One-key GHOST, it seems like this to create this directory:

doslfn >nul
md F:\..
md F:\~1

Loaded long filename support, then created two directories, which can be accessed under DOS,

In WINXP, they are not visible, really amazing.

These two directories are actually one directory, F:\~1.

In the CMD of WINXP, using DIR can see a [..] directory, this directory cannot be entered.

Only by using cd ~1 can enter this hidden directory.

Also can start F:\~1 to open this directory.

Finally created successfully.
Floor 8 Posted 2007-04-12 13:37 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
Originally posted by GOTOmsdos at 2007-4-11 09:56 PM:
The following is the batch processing module I wrote to create multi-layer, long filename directories in the DOS game running system

(Conditions: there is FIND, GET, may also need DOSLFN,
In addition, there are a few WBATs. If you don't use WBAT, just remove them and...)


Thank you, GOTOmsdos, for your help. Just the sentence

  "may also need DOSLFN"

was a real eye-opener for me.

Run under DOS

DOSLFN
md F:\..
md F:\~1

Friends who are interested might as well give it a try.
Floor 9 Posted 2007-04-13 00:10 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 866
Posts 415
Joined 2005-12-04 11:19
20-year member
UID 46459
Status Offline
Interesting. Learned.
Floor 10 Posted 2007-04-13 02:04 ·  中国 四川 成都 电信
初级用户
Credits 25
Posts 13
Joined 2007-02-23 14:14
19-year member
UID 80023
Gender Male
Status Offline
Learned a lot, thank you.
Floor 11 Posted 2007-04-13 05:49 ·  中国 广西 北海 电信
新手上路
Credits 4
Posts 2
Joined 2007-04-13 05:23
19-year member
UID 84976
Gender Male
Status Offline
Learning
Floor 12 Posted 2007-04-13 13:30 ·  中国 福建 漳州 电信
初级用户
Credits 38
Posts 15
Joined 2007-02-10 07:42
19-year member
UID 79143
Gender Male
Status Offline
I ran under DOS
Running under DOS

DOSLFN
md F:\..
md F:\~1

Among them, the DOSLFN. EXE execution is completed
MD F:\~1 is completed
But md f:\.. prompts "Unable to create directory"
Where did I go wrong
Floor 13 Posted 2007-04-13 13:49 ·  中国 福建 漳州 电信
初级用户
Credits 38
Posts 15
Joined 2007-02-10 07:42
19-year member
UID 79143
Gender Male
Status Offline
In addition, when running under WINXP, executing the entire batch file will form a ~1 directory. But it cannot be hidden
Floor 14 Posted 2007-04-13 22:23 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
This might be basic knowledge of DOS?

..\ and .\ are automatically assigned by the system (the same in LINUX)
..\ means the upper-level directory
.\ means the current-level directory

In the graphical state of WIN, they are not visible, but in the command line they are.

But there are also differences:
In DOS:
You can CD.. or CD ..
But in LINUX:
Only CD ..

To hide:
ATTRIB +H directory
For details, you can view:
ATTRIB /?

[ Last edited by GOTOmsdos on 2007-4-13 at 10:28 PM ]
Floor 15 Posted 2007-04-13 22:32 ·  中国 福建 漳州 电信
初级用户
Credits 38
Posts 15
Joined 2007-02-10 07:42
19-year member
UID 79143
Gender Male
Status Offline
Boss, you may have misunderstood my meaning. The original intention of the thread starter is to create a hidden directory on drive F that can be seen under DOS but not under Windows, similar to the dwarf's ARGO.. The dwarf's can be seen under Windows, and he wants to create a directory stronger than the dwarf's.

I know that.. is automatically assigned by the system.

But the current key is to create such a directory on f:\. The problem is how to create it.

According to
1 2 3 5 Next ›
Forum Jump: