中国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-18 22:13
47,814 topics / 349,908 posts / today 1 new / 48,259 members
DOS疑难解答 & 问题讨论 (解答室) » [Discussion] How does OneKey Ghost create a deeply hidden folder like ~1?
Printable Version  14,648 / 63
Floor1 lp1129 Posted 2007-04-12 06:18
初级用户 Posts 92 Credits 186
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 ]
Floor2 tossboy Posted 2007-04-12 09:41
新手上路 Posts 3 Credits 6
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.
Floor3 lp1129 Posted 2007-04-12 10:53
初级用户 Posts 92 Credits 186
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.
Floor4 GOTOmsdos Posted 2007-04-12 10:56
铂金会员 Posts 1,827 Credits 5,154
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
Floor5 lp1129 Posted 2007-04-12 11:22
初级用户 Posts 92 Credits 186
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.
Floor6 GOTOmsdos Posted 2007-04-12 11:41
铂金会员 Posts 1,827 Credits 5,154
Oh,
But, the deep directory means multi-layer directories

Then I'll take a look at what's going on..
Floor7 lp1129 Posted 2007-04-12 13:19
初级用户 Posts 92 Credits 186
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.
Floor8 lp1129 Posted 2007-04-12 13:37
初级用户 Posts 92 Credits 186
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.
Floor9 htysm Posted 2007-04-13 00:10
高级用户 Posts 415 Credits 866
Interesting. Learned.
Floor10 wmjm Posted 2007-04-13 02:04
初级用户 Posts 13 Credits 25
Learned a lot, thank you.
Floor11 jianlichuan Posted 2007-04-13 05:49
新手上路 Posts 2 Credits 4
Learning
Floor12 drake Posted 2007-04-13 13:30
初级用户 Posts 15 Credits 38
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
Floor13 drake Posted 2007-04-13 13:49
初级用户 Posts 15 Credits 38
In addition, when running under WINXP, executing the entire batch file will form a ~1 directory. But it cannot be hidden
Floor14 GOTOmsdos Posted 2007-04-13 22:23
铂金会员 Posts 1,827 Credits 5,154
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 ]
Floor15 drake Posted 2007-04-13 22:32
初级用户 Posts 15 Credits 38
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 45  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023