Search found 137 matches

by batchcc
12 Feb 2016 10:25
Forum: DOS Batch Forum
Topic: Search user input for character
Replies: 11
Views: 3409

Re: Search user input for character

Every time I try this code even when the input has no "e" the variable %loc% echos -1
by batchcc
12 Feb 2016 08:37
Forum: DOS Batch Forum
Topic: Search user input for character
Replies: 11
Views: 3409

Re: Search user input for character

If the user input has more than one of a character let's say "e" always use the first occurrence of the letter for example "there"

Code: Select all

Set before= th
Set char=e
Set after=re

The input will always be one word but may contain -^/+* and any number or lowercase letter
by batchcc
12 Feb 2016 07:21
Forum: DOS Batch Forum
Topic: Search user input for character
Replies: 11
Views: 3409

Search user input for character

I have the following code to get user input and I want to search their input for a character and set anything before that character as %before% the character as %char% and after that character as %after% does anyone have any idea on how to do this? Thanks everyone! @echo off Cls Set /p input="e...
by batchcc
30 Jan 2016 17:18
Forum: DOS Batch Forum
Topic: Batch file encrypter
Replies: 1
Views: 1173

Batch file encrypter

I am working on a modifying batch file that encrypt test I want it to encrypt a file whats wrong with this code? set named=asd.txt @echo off setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION title Encrypt color a :mainmenu set savefile=on ::set Encrypt=Nothing (set CHAR[a]=UDFM45) & (set CHAR[b]=...
by batchcc
12 Jan 2016 16:04
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Okay, thank you Foxdrive, I realized the file I was trying to delete was read only. I do have another question about this code though I can’t seem to make it work if "%~1"=="/e" goto ext :ext if "%~2"=="" ( set /p d=enter path of folder to delete: ) else ( set...
by batchcc
11 Jan 2016 14:29
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

but the code doesnt work on my computer Foxdrive H:\1\A\del>(if /I not "Delete.bat" == "sdel!random!.sdel" for %g in ("sdel!random!.sdel") do The line above shows you have a file called "sdel!random!.sdel" and it must have been held open and locked by some pr...
by batchcc
11 Jan 2016 13:54
Forum: DOS Batch Forum
Topic: And now dos batch color secrets?
Replies: 19
Views: 8072

Re: And now dos batch color secrets?

It gives me this error over and over again.

Code: Select all

░C:\Users\User\AppData\Local\Temp\FPU-Module.js(1, 1) Microsoft JScript runtime error: Au
tomation server can't create object
by batchcc
10 Jan 2016 10:37
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Okay Foxdrive but I am unsure of how to fix these errors Here's a method to do the same thing you are doing, which should be robust. Ask any questions you have, as it seems that you're struggling a little at this point in time. Those first two lines below do nothing, but you may know that. if /i &q...
by batchcc
09 Jan 2016 20:32
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Squashman wrote:Why do you have "%%f" on a line by itself.

When I was looking at other codes on SO there was %%f at the end of the line so I placed it at the end of the code I'm not sure if that's correct or not.
by batchcc
09 Jan 2016 08:16
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Several things there will cause your script to fail with certain names. cd /d %d% for /f "eol=: delims=" %%f in ('dir /b /a-d^|findstr /vire "\.%extm%"') do ( if not "%~nx0"=="%%f" ren "%%~f" "sdel!random!.sdel" for %%f in (*.sdel) do type...
by batchcc
04 Jan 2016 14:12
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Thank you so much If I had to give you a grade for that code I would give you an F. your grade was very helpful! if "%~1"=="/em" goto extm :extm if "%~2"=="" ( set /p d=enter path of folder to delete: ) else ( set "d=%~2" ) if "%~3"=="...
by batchcc
03 Jan 2016 13:21
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

You sure are doing a lot of work for a program that really does not do secure deletion of a file. I could download a dozen different utilities from the web that could recover the files you are trying to "securely" delete. Squashman I have decided to change the objective of sdel.bat from s...
by batchcc
02 Jan 2016 12:10
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Thanks Merkat the code works great!
by batchcc
02 Jan 2016 08:40
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

Sorry Meerkat but the code doesn’t delete the files in sub directories like it was intended to do you have any idea why and how to fix it
by batchcc
02 Jan 2016 06:13
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 13520

Re: Sdel - speedy deletion utility

this still doesn't work if /i "%~1"=="/s" ( goto sub ) :sub if "%~2"=="" ( set /p d=enter path of folder to delete: ) else ( set "d=%~2" ) cd /d %d% setlocal EnableDelayedExpansion FORFILES /S /C "CMD /C ECHO @relpath">slist.txt for /f &quo...