Posts by It Wasn't Me • 1,897 points
127 posts
-
2
votes2
answers1438
viewsA: Doubt when joining txt files
Use a copy /Bignaria: copy /B *.txt unir.txt
cmdanswered It Wasn't Me 1,897 -
1
votes2
answers170
viewsA: Computer architecture with bat
Yes, to check if the system is 32 or 64 bis: To get with a loop for: for /f %%a in ('wmic os get osarchitecture ^|find /i "bits"') do @echo/ %%a bits Or with if exist you still have another way: if…
batanswered It Wasn't Me 1,897 -
4
votes1
answer390
viewsA: bat script to restart onedrive. Does it work?
• To loop during 10 seconds monitoring if there is crashing and rebooting whenever Onedrive appear in lockup: @echo off && setlocal enabledelayedexpansion & cd /d c:\bat set…
-
3
votes1
answer933
viewsA: Logging a batch file
1) Add a if for a conditional loop 2) Redirect a call to the bat itself "setting" the.log file.. 3) add the 3 lines/codes below and at first of your file .bat already existing. Update: To also save…
-
1
votes1
answer715
viewsA: How to list only document name and date using dir command?
Update: using forfiles to obtain date and filename: forfiles /m *.* /c "cmd /c echo/@fdate;@file" Results: 16-04-2019,"Arquivos.ext" The command could be a dir + a double for, and using the…
-
0
votes1
answer154
viewsA: How to show congruent sign ( ) in cmd
1) Based on the comment from @Bacchus 2) Works in the Windows 10 & Windows 8 3) Does not work on Windows 7 For other characters see here!!, then add "0x" + code Hex character, as in echo(0xF0:…
-
1
votes2
answers128
viewsA: batch files - find current file directory
I suggest using the cd /d %~dp0: cd /d alters the current drive + the current directory to the drive and the directory where the batch was initially executed: :: você pode criar uma variável: set…
-
2
votes2
answers22304
viewsA: How to hide command output in CMD?
Update Redirecionamento de erros + saídas normais para arquivo: Error Output + Standard Output for filing cabinet stderr + stdout for filing cabinet To hide the possessed mistakes + warnings + exits…
cmdanswered It Wasn't Me 1,897 -
0
votes2
answers294
viewsA: Boost Performance Bat
1) Use qualified paths instead of variables 2) Directly create the folder by hiding the error in case it already exists 2>nul mkdir "I:\ARQUIVOS_ENCONTRADOS" 3) Grouping () and redirected…
-
0
votes3
answers1953
viewsA: Batch script to rename file extension recursively
The command where return listing the full path of the files, capture this output in a for to rename the extension. An option of a looping for with the where recursive=/r for rename as extension ::…
-
0
votes2
answers178
viewsA: Find files on local drives using Batch
If I got it what quest: @echo off && setlocal enabledelayedexpansion set /a "_cnt=0" & set "_arqui="%temp%\_setup_file_.log"" & set "_ocorr=ocorrencias" echo/ & set…
-
1
votes1
answer6742
viewsA: Enter user and password in bat file
Considering that the system may be wanting to use its logged-in user in the authentication of the command, I can suggest that you try 1x using the password of the logged-in user, not the one you…
batchanswered It Wasn't Me 1,897 -
1
votes1
answer3400
viewsA: How to create . BAT to rename multiple files into multiple folders by inserting date and time of creation?
:: 1) List the files and redirect the output to "%temp%\_file_origem.txt" :: 2) Use a loop for to get the paths and port to the command WMIC "\"="\\" :: 3) Use another loop for to get the creation…
batchanswered It Wasn't Me 1,897 -
0
votes2
answers213
viewsA: How can I continue a BAT on a new profile after restarting
One alternative to make a bat/cmd run on the next boot, to continue the tasks/executions needed, is in exploring the key of the "Runonce" record. It is possible to program a single execution of a…
-
1
votes3
answers1106
viewsA: Doubts with conditional commands in Batch files
1) loop for listing all files in folders and subfolders (dir /s ..) 2) check if eh a jpg and if positive/negative, copy the target folder attending the filter 3) implemented a jpg, other and total p…
-
1
votes2
answers4322
viewsA: How to make decision structure to change color in a bat?
Something like that? @echo off && setlocal enableextensions enabledelayedexpansion ( if exist "%temp%\bg.b64" del /q /f "%temp%\bg.b64" if exist "%temp%\bg.exe" del /q /f "%temp%\bg.exe" )…
-
1
votes1
answer157
viewsA: How do I remove everything after the first word?
Unedited serves only for files with equal layout of your example, where we have the pipe as delimiter, for another delimiter, edit the command set _delimiter, and to the special characters, I…
-
1
votes1
answer177
viewsA: How to create a. bat file that Ionic serves?
1) use quotes on the way 2) add to bat: cd /d %~pd0 3) run the Ionic server call (see the command here!) 4) Check that variables are available and correct(see variables here) cd…
-
2
votes1
answer172
viewsA: How to Recover Updated Date in Batch
Saving the date is possible, but the best thing is synchronize to data/hora via internet, where it is possible to get updated more practical and accurate, for this, use this código: @echo off &…
batchanswered It Wasn't Me 1,897 -
1
votes1
answer456
viewsA: pass input when running bat
Consider 3 things: 1) Python is not my thing 2) If I understand the question 3) If that’s correct: os.environ['_data'] = 'date' 4) At this link if the most correct is: import os name =…
-
0
votes2
answers604
viewsA: Command prompt with React-Native
:: Tchê, se entendi... @echo off && cd /d %systemdrive% & cd \ & title .:^|:. React-native run-android .:^|:. :: usuário == %username% pushd…
-
7
votes1
answer148
viewsA: Fortran variables 77
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/ 1) Is a statement concatenated into a line, is the same thing as declare one by one: ZERO = 0D0 HALF = 0.5D0 ONE = 1D0 TWO = 2D0…
fortrananswered It Wasn't Me 1,897 -
0
votes2
answers571
viewsA: Batch to choose drive letter
You can use the mountvol to obtain the drivers mounted on the system already moving to a variable and use it in a looping for to verify the existence of the folder in each driver mounted via…
batchanswered It Wasn't Me 1,897 -
1
votes2
answers2019
viewsA: Invalid character in file . bat
Maybe your problem is not in batch, but in the character page used on the system by the prompt/cli interface, I suggest checking the key settings:…
-
1
votes1
answer418
viewsA: take the last 2 tokens of a variable in Batch
Would that be? @echo off set "_var_=Rastreando a rota para user722-PC [192.168.1.106]" for /f "tokens=5,6* delims=^ " %%i in ('echo/%_var_%') do echo/%%i %%j exit: user722-PC [192.168.1.106]…
-
0
votes2
answers535
viewsA: Store diverse information in a batch notepad
Update: item 1) Saving in Bat Itself @echo off & setlocal enabledelayedexpansion & title <nul & title Q344161 for /f "skip=8tokens=1,2,3delims=-" %%a in ('type "%~f0"')do if…
-
1
votes2
answers585
viewsA: Delete file with name and path in other file. bat
• In a looping for using the variables %%i & %%j Applied in: name path For the following layout of your file: abcd, D:/user/desktop/teste123 efgh, D:/user/desktop/folder789 • delete path/name =…