Search found 143 matches

by DOSadnie
16 Jul 2023 12:27
Forum: DOS Batch Forum
Topic: Forum issue: answering without being logged produces unnecessary error
Replies: 2
Views: 1382

Re: Forum issue: answering without being logged produces unnecessary error

That is not the point

The point is
DOSadnie wrote:
15 Jul 2023 04:48
[...]
this is the only forum out of dozens I am active on where such ill behavior is instituted
And that by changing this it would become more
DOSadnie wrote:
15 Jul 2023 04:48
user friendly
[...]
by DOSadnie
15 Jul 2023 05:06
Forum: DOS Batch Forum
Topic: Deleting only certain files from specified location and its sub-folders [SOLVED]
Replies: 5
Views: 2094

Re: Deleting only certain files from specified location and its sub-folders

As the initial question had been answered, I have just created a separate topic for the newer one: viewtopic.php?f=3&t=10858
by DOSadnie
15 Jul 2023 05:03
Forum: DOS Batch Forum
Topic: Deleting files with sending them to Recycle Bin [SOLVED]
Replies: 8
Views: 3939

Deleting files with sending them to Recycle Bin [SOLVED]

A script like this

Code: Select all

del /q C:\Test
does delete files in that folder - but unfortunately without a fail-safe in form of sending them the Recycle Bin

So how can I delete files not so permanently?

[And no: I do not want to use a post-mistake workaround of using recovery tools]
by DOSadnie
15 Jul 2023 04:50
Forum: DOS Batch Forum
Topic: Unable to produce truthful info about deletion or lack of thereof [SOLVED]
Replies: 8
Views: 2405

Re: Unable to produce truthful info about deletion or lack of thereof

I cannot delete it as it has sub-folders that I need to keep
by DOSadnie
15 Jul 2023 04:48
Forum: DOS Batch Forum
Topic: Forum issue: answering without being logged produces unnecessary error
Replies: 2
Views: 1382

Forum issue: answering without being logged produces unnecessary error

If someone is not logged in but click Post Reply button, then that someone instead of being automatically redirected to the login page [https://www.dostips.com/forum/ucp.php?mode=login] gets a page that says General Error SQL ERROR [ mysqli ] Table './dostips_forum/phpbb_qa_confirm' is marked as cra...
by DOSadnie
15 Jul 2023 04:08
Forum: DOS Batch Forum
Topic: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files [SOLVED]
Replies: 11
Views: 3641

Re: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files blunt

[...] Hint, there is nothing wrong with the filename or location. And so it seems Because now what I got was this X:\>( cd /D P: del /AH /S /Q ~$*.xlsm ) Could Not Find P:\~$*.xlsm Y:\>( cd /D W: del /AH /S /Q ~$*.xlsm ) Deleted file - Y:\TEST2\~$some test file.xlsm Z:\>( /D del /AH /S /Q ~$*.xlsm ...
by DOSadnie
15 Jul 2023 03:13
Forum: DOS Batch Forum
Topic: @echo off does not work for timeout [SOLVED]
Replies: 7
Views: 12825

Re: @echo off does not work for timeout

What has worked for me [at lest in 3 out of 4 BAT file with multiple commands] was adding of

Code: Select all

>nul
at the end of almost each command; e.g.

Code: Select all

timeout /t 5 | findstr /R ".0$" >nul

As for using

Code: Select all

@echo off
in each case just one at the very beginning of whole script is sufficient
by DOSadnie
13 Jul 2023 09:57
Forum: DOS Batch Forum
Topic: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files [SOLVED]
Replies: 11
Views: 3641

Re: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files blunt

As I had feared, the culprit is not what I am looking for but some other item Because now this @echo off for /F "skip=1" %%D in ('wmic logicaldisk get caption') do ( cd /D %%D dir /AH /S "~$*.xlsm" del /AH /S /Q ~$*.xlsm ) pause [with the exact same test locations and files as before] produces this ...
by DOSadnie
13 Jul 2023 05:53
Forum: DOS Batch Forum
Topic: Breaking PS1 line within BAT file [SOLVED]
Replies: 5
Views: 1980

Re: Breaking PS1 line within BAT file

The above works, so thank you very much And the lines Set-Location -Path 'C:\'; ^ and %EndPowershell% can be removed - and so the final code can look like this powershell.exe ^ $directories = @( ^ 'C:\Users\YOUR-USER-NAME\AppData\Roaming\ASCOMP Software\BackUp Maker\logs' ^ ); ^ foreach ($directory ...
by DOSadnie
13 Jul 2023 05:08
Forum: DOS Batch Forum
Topic: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files [SOLVED]
Replies: 11
Views: 3641

Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files [SOLVED]

This script @echo off for /F "skip=1" %%D in ('wmic logicaldisk get caption') do ( cd /D %%D del /AH /S /Q ~$*.xlsm ) pause goes through every drive [except the system one] and deletes ~$WHATEVER THE REST OF NAME.XLSM files . However it can produce an outcome like this Could Not Find X:\~$*.xlsm Del...
by DOSadnie
13 Jul 2023 04:39
Forum: DOS Batch Forum
Topic: Unable to produce truthful info about deletion or lack of thereof [SOLVED]
Replies: 8
Views: 2405

Unable to produce truthful info about deletion or lack of thereof [SOLVED]

I have this code set "THIS-WILL-BE-DELETED=C:\Users\YOUR-USER-NAME\AppData\Roaming\ASCOMP Software\BackUp Maker" del /q "%THIS-WILL-BE-DELETED%\*.*" dir "%THIS-WILL-BE-DELETED%" 1>NUL 2>&1 if errorlevel 1 ( echo Files were deleted at echo. echo C:\Users\YOUR-USER-NAME\AppData\Roaming\ASCOMP Software...
by DOSadnie
11 Jul 2023 06:05
Forum: DOS Batch Forum
Topic: Breaking PS1 line within BAT file [SOLVED]
Replies: 5
Views: 1980

Re: Breaking PS1 line within BAT file

Use the standard line-continuation of cmd using a caret at the end of the line. The following will probably work (untested): [...] It did not I tried adjusting it myself and also failed You can review extensive examples of this method at this thread . Then I feed ChatGPT the code from this https://...
by DOSadnie
06 Jul 2023 06:13
Forum: DOS Batch Forum
Topic: Breaking PS1 line within BAT file [SOLVED]
Replies: 5
Views: 1980

Breaking PS1 line within BAT file [SOLVED]

I had this PS1 script $directories = @( "C:\Users\YOUR-USER-NAME\AppData\Roaming\ASCOMP Software\BackUp Maker\logs" ) foreach ($directory in $directories) { Set-Location -Path $directory Get-ChildItem -Filter "*.log~" | Where-Object { $_.Attributes -band [System.IO.FileAttributes]::Archive } | Remov...
by DOSadnie
04 Jul 2023 03:42
Forum: DOS Batch Forum
Topic: Inserting comment within a broken line - is it possible? [WORKAROUND]
Replies: 8
Views: 2508

Re: Inserting comment within a broken line - is it possible?

Now that is a neat workaround - but also time consuming, the more elements from a single line a user wants to comment on

Thank you both for you help
by DOSadnie
04 Jul 2023 03:38
Forum: DOS Batch Forum
Topic: Deleting from a Recycle Bin folder all items except certain file formats
Replies: 13
Views: 17527

Re: Deleting from a Recycle Bin folder all files except certain file formats

In other words, this script needs to be reworked so that:

1] it list volumes

2]
it deletes [specified] files in Recycle Bins on those volumes

3] it deletes folders in Recycle Bins also on those volumes