Search found 137 matches

by batchcc
01 Jan 2016 18:56
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

Oh I just replaced %%a with %%f but I also needed to change this if not "%~nx0"=="%%f" ren "%%~a" "sdel!random!.sdel" To this if not "%~nx0"=="%%f" ren "%%~f" "sdel!random!.sdel" I'm not sure if this is correct and I am ...
by batchcc
01 Jan 2016 14:13
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

This still doesn't seem to be working for me. 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"...
by batchcc
01 Jan 2016 10:57
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

I tried to add a /s function to sdel.bat but its not working can someone explain why? sdel /s 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...
by batchcc
01 Jan 2016 10:39
Forum: DOS Batch Forum
Topic: Call label from other batch file
Replies: 12
Views: 6898

Re: Call label from other batch file

Thank you everyone for helping me your solutions all worked very well. :) -Batchcc
by batchcc
31 Dec 2015 09:14
Forum: DOS Batch Forum
Topic: Call label from other batch file
Replies: 12
Views: 6898

Call label from other batch file

How can I call a label in a batch file from a different batch file.

Code: Select all

@echo off 
Cls
Call other.bat hello

Code: Select all

::other.bat
@echo off
Cls
Echo hello
:hello
Good bye
by batchcc
26 Dec 2015 15:07
Forum: DOS Batch Forum
Topic: When to use ! In batch
Replies: 2
Views: 6329

When to use ! In batch

When do you use the ! Sign in batch rather than the % sign for variables?
by batchcc
24 Dec 2015 10:15
Forum: DOS Batch Forum
Topic: Run batch file as command without calling it
Replies: 1
Views: 1123

Run batch file as command without calling it

Can I run batch file as command without calling it for example File1.bat @echo off Cls Hello Pause In this code hello would be a command that calls a file in the same directory named hello.bat here is hello.bat's code @echo off Cls Echo hello When I try to do this the code exits rather that pausing ...
by batchcc
21 Dec 2015 17:13
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

Sorry Squashman,
I was just wondering when to use "!" instead of "%", I thought you had changed that sorry.
by batchcc
21 Dec 2015 15:11
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

Thank you Squashman, the code works perfectly but I do have a question about it. I noticed that you changed sdel%random%.sdel to sdel!random!.sdel is the a reson why you replaced the "%" with "!" cd /d %d% setlocal EnableDelayedExpansion for %%a in (*.*) do ( if not "%~nx0&q...
by batchcc
21 Dec 2015 13:57
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

sorry for the error I meant Interpret Based on if /i "%~1"=="/?" I could tell it was a help section I then modied the code to /f but I am still not sure how to use this to intemperate a file path with what I am assuming would look like this If /I "%~2"=="something ...
by batchcc
20 Dec 2015 14:11
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

Based on if /i "%~1"=="/?" I could tell it was a help section I then modied the code to /f but I am still not sure how to use this to intemperate a file path with what I am assuming would look like this If /I "%~2"=="something here" But I am not sure what woul...
by batchcc
20 Dec 2015 12:40
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel - speedy deletion utility

Do you even understand any of the code you are using then?
Tell me what this code does and how you could replicate it too solve your question.
Code:
if /i "%~1"=="/f" (
goto file
)

I only know how it works based on the context of the code.
by batchcc
19 Dec 2015 19:01
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

Re: Sdel secure speedy deletion utility

Sorry squashman and sorry but Im not sure how to do this I am relatively new to batch coding would you mind helping me do that. Thank you squashman!
by batchcc
19 Dec 2015 11:35
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 15195

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: 15195

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