Search found 127 matches

by nnnmmm
02 May 2024 01:01
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 9
Views: 359

Re: pushd popd depend on batch filenames with which they run... why?

pushd "%~0\.." set "batch.dir=%cd%" cd.. %0 gives you crysis2.bat %~0 gives you without quotes what is \.. for? what does crysis2.bat\.. stand for? what does it mean by cd.. and not by CD .. ? i got it the simplest form after staring at your code for long, now i am like ....what couldnt i think of t...
by nnnmmm
01 May 2024 23:32
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 9
Views: 359

Re: pushd popd depend on batch filenames with which they run... why?

>What exactly are you looking for, when you write "i will find a detour to find a parent dir name"? it may be my boring story, but goes something like this i am nornamlly expecting this way W:\Crysis 2>Crysis2.exe but this program runs this way W:\Crysis 2\Bin32>Crysis2.exe from its sub no matter wh...
by nnnmmm
01 May 2024 10:41
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 9
Views: 359

Re: pushd popd depend on batch filenames with which they run... why?

If you call the file with a filename only (encapsulated in doublequotes), then you should get this output: "W:\Crysis 2\bin32\AAA BBB.bat" produces a "wrong" result as below w:\Crysis 2\bin32\ w:\Crysis 2\bin32\ w:\Crysis 2\bin32\ ---------------------------------------------------------------------...
by nnnmmm
30 Apr 2024 04:19
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 9
Views: 359

Re: pushd popd depend on batch filenames with which they run... why?

you got the same results as i did, is it possible to explain why?
by nnnmmm
30 Apr 2024 01:55
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 9
Views: 359

pushd popd depend on batch filenames with which they run... why?

"AAA BBB.bat" and "AAABBB.BAT" have the same batch as below @ECHO OFF CLS SET "A1=%~dp0" PUSHD "%A1%" CD .. SET "B1=%~dp0" POPD SET "C1=%~dp0" ECHO %A1% ECHO %B1% ECHO %C1% pause AAA BBB.bat produces W:\Crysis 2\bin32\ W:\Crysis 2\ W:\Crysis 2\bin32\ but AAABBB.bat produces W:\Crysis 2\bin32\ W:\Cr...
by nnnmmm
05 Apr 2024 23:43
Forum: DOS Batch Forum
Topic: how do i get the filesize from a filename? and compare with IF statement
Replies: 2
Views: 338

Re: how do i get the filesize from a filename? and compare with IF statement

>Surprised your searching did not find any... i can get these if /? for /? but i get no answers from the websearch of "batch command / > ^ /*... etc" i used to get a headache looking for operator's meanings, it became a habit not to look for them much, then it kind of extended to other searchable a...
by nnnmmm
04 Apr 2024 07:50
Forum: DOS Batch Forum
Topic: how do i get the filesize from a filename? and compare with IF statement
Replies: 2
Views: 338

how do i get the filesize from a filename? and compare with IF statement

SET Y22=%~dp0Data\minigun_fire.wav SET Y32=%~dp0Data\minigun_fire.wav how do i get the filesizes of %Y22% and %Y32%? IF EXIST "%Y22%" IF filesize of %Y22%==100 ECHO Sound MOD 1 installed IF EXIST "%Y32%" IF filesize of %Y32%==200 ECHO Sound MOD 2 installed IF NOT filesize of %Y22%==100 IF NOT files...
by nnnmmm
04 Apr 2024 07:33
Forum: DOS Batch Forum
Topic: what is the difference between 1> and 2>
Replies: 4
Views: 590

Re: what is the difference between 1> and 2>

>It doesn't matter if you put it at the front or the back

thanks, i will go back to this way
2>nul RMDIR /S /Q "%A1%\MCC\Saved\Crashes"
2>nul RMDIR /S /Q "%A1%\MCC\Saved\webcache"
2>nul RMDIR /S /Q "%A1%\MCC\Saved\Config\CrashReportClient"
by nnnmmm
31 Mar 2024 17:33
Forum: DOS Batch Forum
Topic: what is the difference between 1> and 2>
Replies: 4
Views: 590

Re: what is the difference between 1> and 2>

this was the 1st time i tried, and redirection webpage was this way. SET A1=%LocalAppData%Low del /q "%A1%\MCC\Saved\Logs\cef3.log" 2>nul RMDIR /S /Q "%A1%\MCC\Temporary" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\Crashes" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\webcache" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\Config\...
by nnnmmm
31 Mar 2024 10:46
Forum: DOS Batch Forum
Topic: what is the difference between 1> and 2>
Replies: 4
Views: 590

what is the difference between 1> and 2>

SET A1=%LocalAppData%Low 2>nul del /q "%A1%\MCC\Saved\Logs\cef3.log" 2>nul RMDIR /S /Q "%A1%\MCC\Temporary" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\Crashes" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\webcache" 2>nul RMDIR /S /Q "%A1%\MCC\Saved\Config\CrashReportClient" SET A1=%LocalAppData%Low 1>nul del /q "%A1%\...
by nnnmmm
26 Jan 2024 23:13
Forum: DOS Batch Forum
Topic: is there a DOS command for running a program with windows 98 compatibility?
Replies: 11
Views: 10955

Re: is there a DOS command for running a program with windows 98 compatibility?

there was no search result for the string "CompLayer" in regedit
but ZombieShooter2.exe had the results as below
~ WIN98
~ WINXPSP3
~ VISTARTM
~ VISTASP2
~ WIN7RTM
~ WIN8RTM
i just removed ~ for CompLayer=

it worked, thanks
by nnnmmm
25 Jan 2024 06:04
Forum: DOS Batch Forum
Topic: is there a DOS command for running a program with windows 98 compatibility?
Replies: 11
Views: 10955

Re: is there a DOS command for running a program with windows 98 compatibility?

set "CompLayer=WIN98" what would be the CompLayer value for WinXP and Window 8.1 and maybe for vista and windows 7? maybe any of the below things? "CompLayer=WINXP" "CompLayer=WINDOWS XP" "CompLayer=XP" "CompLayer=XPSP3" "CompLayer=WIDOWS8" "CompLayer=WIN8" websites didnt have much about CompLayer ...
by nnnmmm
21 Oct 2023 20:47
Forum: DOS Batch Forum
Topic: i need to check on a branch if it has any files other than desktop.ini
Replies: 8
Views: 23769

Re: i need to check on a branch if it has any files other than desktop.ini

@echo off SET Q1=C:\ZTREE\NIRCMDC.EXE SET Q2=C:\ZTREE\NIRCMDC-64.EXE IF DEFINED PUBLIC (SET QQ=%Q2%) ELSE (SET QQ=%Q1%) set "dir1=%USERPROFILE%\Pictures" set "dir2=%USERPROFILE%\Downloads" if exist "%dir1%" ( for /f "delims=" %%i in ('dir /b /s /a-d "%dir1%"') do ( if /i "%%~nxi" neq "desktop.ini" ...
by nnnmmm
21 Oct 2023 04:15
Forum: DOS Batch Forum
Topic: i need to check on a branch if it has any files other than desktop.ini
Replies: 8
Views: 23769

Re: i need to check on a branch if it has any files other than desktop.ini

@echo off set "YourFolder=%USERPROFILE%\Pictures" if exist "%YourFolder%" ( pushd "%YourFolder%" dir /b /a-d /s | findstr /v /x /i "desktop.ini" | findstr .* >NUL if not errorlevel 1 ( echo ALERT pause ) popd ) this batch always shows ALERT, even though there are no other files other than desktop.i...
by nnnmmm
21 Oct 2023 00:47
Forum: DOS Batch Forum
Topic: i need to check on a branch if it has any files other than desktop.ini
Replies: 8
Views: 23769

Re: i need to check on a branch if it has any files other than desktop.ini

C:\Users\AAA\Pictures\Camera Roll\ C:\Users\AAA\Pictures\Saved Pictures\ C:\Users\AAA\Pictures\other game names\ the batch detects these as files. they can have directories, and programs always rebuild these directories, so no point to delete them, but i wont allow this kind of trash files in where ...