Recycle bin for DOS
- You should have a hidden folder called "Recycler" off the root of Drive
"C" (depending on operating system). You could copy the file to that
folder before doing a DOS delete. Or you could just create a folder (your
name choice) and copy it/them to it before doing anything it/them.
Create a bat-file perhaps named "sDel.BAT" standing for safe delete
COPY <whatever> c:\recycler
Then, down the road, I think you could use the Recycle Bin to really get
rid of them when you feel safe.
01/19/2005 01:45 PM
Please respond to batchworld
Subject: [BATCH WORLD] Recycle bin for DOS
Is it possible to simulate a "recycle bin" using batch files?
To Post a message, send it to: batchworld@...
To Unsubscribe, send a blank message to:
Yahoo! Groups Links
To visit your group on the web, go to:
To unsubscribe from this group, send an email to:
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
- On Wed, 19 Jan 2005 18:45:33 -0000, Bill wrote:
> Is it possible to simulate a "recycle bin" using batch files?Bill, is this for MSdos with short filenames? I have an idea but need more
- On Thu, 20 Jan 2005 19:29:33 +1100, Mic wrote:
> On Wed, 19 Jan 2005 18:45:33 -0000, Bill wrote:Here's my idea, see if it suits. All lines start in column 4
>> Is it possible to simulate a "recycle bin" using batch files?
> Bill, is this for MSdos with short filenames? I have an idea but need more
so any lines in column 1 have wrapped.
if [%1]==[/?] %0
if [%1]== echo.Purpose: Dos Recycle bin
if [%1]== echo.
if [%1]== echo. Syntax: DR [Drive:\Path\]filespec.ext
if [%1]== echo.
if [%1]== echo.Description: This is designed to create a recycle scheme
if [%1]== echo. for MSDOS when using short filenames.
if [%1]== echo. It will move the file(s) to be deleted to
if [%1]== echo. a directory called DOSCYCLE in the root directory
if [%1]== echo. of the appropriate drive.
if [%1]== echo.
if [%1]== echo. If the path of the file is specified then it will
if [%1]== echo. create the same path under the DOSCYCLE directory
if [%1]== echo.
if [%1]== echo. Tested in XP :)
if [%1]== goto :EOF
if exist %temp%.\edl.com goto :skip
:: ascii assembler line processing utility by Herbert Kleebauer
:: for the source code and usage information, use this URL
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>%temp%.\edl.com
:: Usage: edl "string1" "string2" <infile.ext >outfile.ext
:: Replaces all non empty lines in the infile by string2 and
:: writes it to the outfile. (a line considered non empty if
:: it contains at least one character greater than hex 0x20)
:: All characters in string1 are used as delimiters in the input line.
:: Example: echo Fi.le.na.me.ext|edl "." "$22$$L$22"
:: returns just "Fi.le.na.me"
:: string2 can contain any mixture of the following:
:: $00 to $ff : hex numeral of ASCII character ($22=" $24=$ $41=A $61=a)
:: $:abcd : input line range,in hex ($:0105 is characters 1 to 5)
:: ($:03ff is characters 3 to 255)
:: $#0 : complete input line
:: @#0 : complete input line (doubles % for use in batch files)
:: $#n (n=1..8) : nth word in input line from 1st to 8th
:: $#9 : last word in input line from 9th onward
:: $l : input line until the first delimiter char
:: $L : input line until the last delimiter char
:: $r : input line from the first delimiter char onward
:: $R : input line from the last delimiter char onward
:: $+ : increment the number before $+ (001$+)
:: $- : decrement the number before $- (002$-)
:: $tY : year - leading 2 digits (20 for 2003)
:: $ty : year - trailing 2 digits (13 for 2013)
:: $tm : month - 2 digits
:: $td : day - 2 digits
:: $tH : hour - 2 digits in military time (23:00 is 11pm)
:: $tM : minute - 2 digits
:: $tS : second - 2 digits
:: replace $xx with @xx and all % signs are then doubled
:: Initialise variables
:: Detect spaces in the path\filespec etc
if errorlevel 1 echo Only short path/filenames please
if errorlevel 1 echo.
if errorlevel 1 %0
echo.%1|find " ">nul
if not errorlevel 1 echo Only short path/filenames please
if not errorlevel 1 echo.
if not errorlevel 1 %0
: Detect if a path is part of the filespec
echo %1|find "\">nul
if errorlevel 1 goto :skip2
:: extract drive letter and path\filename
echo %1|%temp%.\edl.com ":" "set drv=$l:$0a$0dset pth=$r">%temp%.\edlbat.bat
:: If no drive letter was specified then correct the PTH and DRV variables
if "%pth%"=="" set flag=!
if "%flag%"=="!" set pth=%drv%
if "%flag%"=="!" set drv=
:: set the path and filename variables
echo %pth%|%temp%.\edl.com "\" "set pth=$L$0a$0dset fil=$R">%temp%.\edlbat.bat
:: detect if the doscycle directory exists and create it if needed
dir /b /a:d /-p %drv%\|find /i "doscycle">nul
if errorlevel 1 MD %drv%\doscycle\
:: create the path within the \DOSCYCLE folder to receive the file(s)
xcopy %temp%.\edl.com %drv%\doscycle%pth%\ >nul
:: Actually recycle the file here
echo Recycling - %drv%\doscycle%pth%\%fil%
move /y %1 %drv%\doscycle%pth%\ >nul
- --- Mic <micm@...> wrote:
>I was impressed with what could be done with Arachne
> Bill, is this for MSdos with short filenames? I
> have an idea but need more
web browsers ability to execute DOS apps from HTML
about 5 years ago, and started making custom desktops
for the women at work to make life easier. Anything
that can be done on a webpage can be incorporated into
On a 386 (7 meg RAM) it was faster with dial-up than
the machines in the building that were on the backbone
of the server upstairs.
I abandoned the project when Arachne went out of
development for over two years. But now it has come
back as GPL, and is being updated regularly. JAVA is
in the works, and has matured to 386+ status.
My disgust with bloatware caused me to start a Yahoo
group in an attempt to develop it into an �operating
Web page here: http://www.geocities.com/arachne_os/
Longer story than I wished to post as an answer,
__Short file names
__Run from RAM drive
__Recycle bin usable from the Arachne shell
Thank you for the impressive batch you posted for me.
It may take me a while to test it thoroughly.
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.