Search found 33 matches
- 23 Mar 2019 23:56
- Forum: DOS Batch Forum
- Topic: Problem with correctly quoting in a FOR /F loop
- Replies: 7
- Views: 8613
Re: Problem with correctly quoting in a FOR /F loop
@dbenham To answer your question: Behind term "!adb!" hides a qualified full-file-path-name that may contain spaces, or not. Hence it gets enclosed in quotes. In my case it gets composed as follows: @echo off & setlocal ENABLEDELAYEDEXPANSION pushd %CD% ... set "adb_executable=adb-server.exe" if !is...
- 23 Mar 2019 00:29
- Forum: DOS Batch Forum
- Topic: Problem with correctly quoting in a FOR /F loop
- Replies: 7
- Views: 8613
Re: Problem with correctly quoting in a FOR /F loop
Thanks for your inputs, guys. To keep you updated: None of the proposed solutions were effective. Have a nice day.
- 21 Mar 2019 01:30
- Forum: DOS Batch Forum
- Topic: Problem with correctly quoting in a FOR /F loop
- Replies: 7
- Views: 8613
Problem with correctly quoting in a FOR /F loop
With regards to maximize the life span of an SSD - as modern PCs have it - I want to reduce writing to it. So my intention is to avoid creating / writing to / erasing temporay files: I want to handle it all in RAM. My current problem is that "!adb!" shell "su -c 'cat /proc/!local_app_pid!/status'" >...
- 18 Jul 2015 02:54
- Forum: DOS Batch Forum
- Topic: Create Windows 8 restore point programmatically
- Replies: 7
- Views: 7761
Re: Create Windows 8 restore point programmatically
foxidrive wrote:Must be run as admin:Code: Select all
wmic /namespace:\\root\default path SystemRestore call createrestorepoint "wmic auto backup", 100, 12
Thanks a lot. Worked like a charm.
- 18 Jul 2015 02:43
- Forum: DOS Batch Forum
- Topic: Create Windows 8 restore point programmatically
- Replies: 7
- Views: 7761
Re: Create Windows 8 restore point programmatically
Squashman wrote:Well if you were Google searching for "DOS code" it will never find it.
For how stupid do you hold me? BTW: I've tested it. Searching Google for "DOS code" delivers 318,000,000 results.
- 16 Jul 2015 01:52
- Forum: DOS Batch Forum
- Topic: Create Windows 8 restore point programmatically
- Replies: 7
- Views: 7761
Create Windows 8 restore point programmatically
Does anyone have any DOS code for creating a system restore point in Windows 8? I have done a Google-search for this but no luck.
- 28 Apr 2015 02:21
- Forum: DOS Batch Forum
- Topic: Multi-theading in batch
- Replies: 4
- Views: 5668
Re: Multi-theading in batch
Yes, starting multiple threads from within a batch file is possible, but of course this only is true, if the apps you start are different ones or, if the app you start is always the same, if it allows running multiple instances of itself. For example HOBOCOPY doesn't allow running multiple instances...
- 02 Apr 2015 06:44
- Forum: DOS Batch Forum
- Topic: How to identify the date format used in "DIR" and "%~T"?
- Replies: 8
- Views: 7267
Re: How to identify the date format used in "DIR" and "%~T"?
Can this help you? @echo off for /f "tokens=1-4 delims=/.- " %%A in ("%date%") do if %%D!==! (set CurrentDate=20%%C%%B%%A) else (set CurrentDate=20%%D%%C%%B) for /f "tokens=1-4 delims=:,. " %%f in ("%time%") do set CurrentTime=0%%f%%g%%h%%i set CurrentDateTim...
- 02 Apr 2015 06:27
- Forum: DOS Batch Forum
- Topic: OT: anyone with an active msn.com account?
- Replies: 3
- Views: 4996
Re: OT: anyone with an active msn.com account?
You simply use your Microsoft Account data ( username / password ) to login to MSN.com
- 25 Mar 2015 10:54
- Forum: DOS Batch Forum
- Topic: How to extract char from string with errorlevel as index
- Replies: 10
- Views: 8288
Re: How to extract char from string with errorlevel as index
Did the replacements: All works perfectly.
@aGerman, thank you for helping.
@aGerman, thank you for helping.
- 25 Mar 2015 10:51
- Forum: DOS Batch Forum
- Topic: provide text file as an input to a batch file
- Replies: 5
- Views: 4872
- 24 Mar 2015 14:53
- Forum: DOS Batch Forum
- Topic: How to extract char from string with errorlevel as index
- Replies: 10
- Views: 8288
Re: How to extract char from string with errorlevel as index
You are right: this works FOR /l %%i IN (1,3,%string_length%) DO ( SET /a "offset=%%i-1" CALL SET "flash_drive=%%flash_drives:~!offset!,2%%" ) but now I don't know how to add "correctly coded" lines currently removed EDIT: Variable script_error_occured is declared and i...
- 24 Mar 2015 13:05
- Forum: DOS Batch Forum
- Topic: How to extract char from string with errorlevel as index
- Replies: 10
- Views: 8288
Re: How to extract char from string with errorlevel as index
Sorry for warming up this thread. A similar problem as initially posted here arose for me, when I wanted to run a string extraction in a FOR loop: neither CALL SET "flash_drive=%%flash_drives:~%offset%,2%%" nor CALL SET "flash_drive=%%flash_drives:~!offset!,2%%" works, CMD.exe cr...
- 21 Mar 2015 08:52
- Forum: DOS Batch Forum
- Topic: [Q]Speediest way to count files?
- Replies: 5
- Views: 4699
Re: [Q]Speediest way to count files?
The total number of files isn't already saved in the properties of a folder. Even if you right-click on a folder to show its properties you will see that the number of files and the size will be slowly counted up until everything is processed. This may take several seconds depending on the structur...
- 21 Mar 2015 08:32
- Forum: DOS Batch Forum
- Topic: Check if process is running.
- Replies: 7
- Views: 9119
Re: Check if process is running.
It won't work if you're checking to see if the verification script is running, but if you're checking to see if a second script is running (which is how I interpreted your question), then it absolutely will work. OK If OP want to do the check within a batch file, at least I understood it so, not fr...