Search found 139 matches

by batchcc
19 Dec 2015 11:35
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 17558

Re: Sdel secure speedy deletion utility

I have updated the code @echo off title SDEL - secure, speedy deltetion if /i "%~1"=="/f" ( goto file ) if /i "%~1"=="/d" ( goto folder ) :again cls echo SDEL - Secure delete program echo. echo F - Delete only one file echo D - Delete all files in this directo...
by batchcc
16 Dec 2015 15:12
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 17558

Re: Sdel secure speedy deletion utility

like this? and it still doesn't work.

Code: Select all

cd /d %d%
for %%a in (*.*) do type nul > %%a
for %%a in (*.*) do ren "sdel%random%.sdel" %%a
for %%a in (*.*) do del *.sdel %%a
by batchcc
16 Dec 2015 14:17
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 17558

Re: Sdel secure speedy deletion utility

Can anyone help fix the "d" option it isnt working and i'm not sure why here is the updated code @echo off title SDEL - secure, speedy deltetion :again cls echo SDEL - Secure delete program echo. echo F - Delete only one file echo D - Delete all files in this directory (folder) echo E - Ex...
by batchcc
15 Dec 2015 14:17
Forum: DOS Batch Forum
Topic: And now dos batch color secrets?
Replies: 20
Views: 9916

Re: And now dos batch color secrets?

Einstein1969 it is not working on my computer; I'm running Windows Vista.
by batchcc
11 Dec 2015 14:20
Forum: DOS Batch Forum
Topic: If input ends with goto
Replies: 1
Views: 1337

If input ends with goto

I have a batch code which the user inputs text but if the input ends in certain letters I want the file to goto a certain location. Here is an example code

Code: Select all

@echo off 
Cls
Set /p word=
If %word% end with ing goto ing
:ing
Echo ing
Pause

Is it possible to do this? Thanks
by batchcc
06 Dec 2015 11:12
Forum: DOS Batch Forum
Topic: Folder "lock" not working
Replies: 7
Views: 3242

Re: Folder "lock" not working

Is this better I haven't tried it yet goto folder :unlock @Echo Off SetLocal EnableExtensions EnableDelayedExpansion Set /P "=Enter a Password:" < Nul Call :PasswordInput set !pwd! =pass if NOT %pass%==password goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Privat...
by batchcc
06 Dec 2015 09:16
Forum: DOS Batch Forum
Topic: Folder "lock" not working
Replies: 7
Views: 3242

Re: Folder "lock" not working

C:\Users\User>title Folder Private C:\Users\User>if EXIST "HTG Locker" goto UNLOCK C:\Users\User>SetLocal EnableExtensions EnableDelayedExpansion C:\Users\User>Set /P "=Enter password to unlock folder:" 0<Nul Enter password to unlock folder: C:\Users\User>Call :PasswordInput C:\...
by batchcc
05 Dec 2015 10:03
Forum: DOS Batch Forum
Topic: Folder "lock" not working
Replies: 7
Views: 3242

Re: Folder "lock" not working

Here is the code I have @Echo Off SetLocal EnableExtensions EnableDelayedExpansion Set /P "=Enter a Password:" < Nul Call :PasswordInput Echo(Your input was:!Line! Goto :Eof :PasswordInput ::Author: Carlos Montiers Aguilera ::Last updated: 20150401. Created: 20150401. ::Set in variable Lin...
by batchcc
04 Dec 2015 13:08
Forum: DOS Batch Forum
Topic: Folder "lock" not working
Replies: 7
Views: 3242

Folder "lock" not working

What am i doing wrong with this "folder lock" it doesn't work it just closes after I type to enter a password. goto folder :unlock @Echo Off SetLocal EnableExtensions EnableDelayedExpansion Set /P "=Enter password to unlock folder:" < Nul Call :PasswordInput set !Line! =pass if N...
by batchcc
04 Dec 2015 10:48
Forum: DOS Batch Forum
Topic: if true echo something else
Replies: 5
Views: 2096

Re: if true echo something else

no I set mode equal to false.
by batchcc
03 Dec 2015 11:49
Forum: DOS Batch Forum
Topic: if true echo something else
Replies: 5
Views: 2096

Re: if true echo something else

Like this?

Code: Select all

@echo off
cls
Set mode1=false
set ar=ar
:top
set /p word=
if %word% == this echo this ----- %ar% && if %mode1% == true echo mode 1 is true
if %word% == mode1 set mode1=true
if %mode1% == true goto m1
goto top
:m1
set ar= hello
goto top
pause
by batchcc
03 Dec 2015 10:36
Forum: DOS Batch Forum
Topic: if true echo something else
Replies: 5
Views: 2096

if true echo something else

I have the following code can anyone tell me why it doesnt work and how to fix it. I want the code to allow the user to enter a word (this) and if the enter it the file prints this and the environmental variable %ar%. if the user types "mode1" then the file should set %ar% as the word hell...
by batchcc
30 Nov 2015 14:10
Forum: DOS Batch Forum
Topic: Type environmental variable that doesn't exist
Replies: 1
Views: 1083

Type environmental variable that doesn't exist

I have the following batch code @echo off cls echo enter first word set /p a= echo enter second word set /p b= @echo off @echo if %word% == %a% echo to %b% ----- %c%>> c.txt @echo if %word% == %b% echo to %a% ----- %c%>> c.txt goto top unfortunately the environmental variables %word% and %c% don't g...
by batchcc
27 Nov 2015 11:37
Forum: DOS Batch Forum
Topic: Force user input other than space
Replies: 1
Views: 1078

Force user input other than space

I have a batch file that prompts the user to input text but the user can just hit enter or use a space to go on to the next question is there a way to restrict the user from entering space "skip" or just hitting enter? Thanks @echo off Cls :name Echo please enter your name Set /p name= If ...
by batchcc
14 Nov 2015 17:27
Forum: DOS Batch Forum
Topic: user input in #.### format
Replies: 3
Views: 1340

Re: user input in #.### format

Code: Select all

set "decimal=%decimal%00"
set "decimal=%decimal:~3%"

I'm sorry I have never done this before is this correct?