Search found 4142 matches

by Squashman
24 May 2021 08:42
Forum: DOS Batch Forum
Topic: If not exist command
Replies: 1
Views: 284

Re: If not exist command

You have not shown us enough code to make any definitive solution to your problem.

Not understanding why you are checking it after the robocopy command.
by Squashman
23 May 2021 22:07
Forum: DOS Batch Forum
Topic: Sending command to a single in a text file
Replies: 2
Views: 281

Re: Sending command to a single in a text file

Why not....?

Code: Select all

echo %computername% %date%
by Squashman
17 May 2021 07:41
Forum: DOS Batch Forum
Topic: How to add files larger than 100 kb to the 7z archive?
Replies: 1
Views: 344

Re: How to add files larger than 100 kb to the 7z archive?

The FOR command provides a mechanism to get the size of a file.

Code: Select all

for %%G IN (somefile.txt) do @echo %%~zG
You may have remembered this when you were directed to read the help file when you asked this question
by Squashman
15 May 2021 21:12
Forum: DOS Batch Forum
Topic: Run program with different methods in loops
Replies: 3
Views: 442

Re: Run program with different methods in loops

liargof wrote:
15 May 2021 06:14
Thank you!

If I want to see each method running in separate CMD window, should I remove the "/b" that comes after the "start"?

What I want is that each method will run in loops in its own command window
What is stopping you from testing that code change?
by Squashman
10 May 2021 12:39
Forum: DOS Batch Forum
Topic: Batch Rename of files in a folder
Replies: 1
Views: 389

Re: Batch Rename of files in a folder

You were pretty much given the code in your previous question from 6 years ago.

Code: Select all

FOR /F "tokens=1-6 delims=-" %%A IN ('dir /a-d /b *.dwg') DO rename "%%A-%%B-%%C-%%D-%%E-%%F"  "%%A-%%B-%%C-%%D-1961-%%F"
by Squashman
06 May 2021 07:55
Forum: DOS Batch Forum
Topic: A tool for managing multiple running dos batches
Replies: 8
Views: 709

Re: A tool for managing multiple running dos batches

Hi Squash, Thanks, but I think the users need an interface. But you're right, TASKLIST can be useful in some contexts, when writing batches that need to check if other batches are running. TASKLIST with verbose output will also show you what you want. Then you can use TASKKILL. Not that hard to bui...
by Squashman
06 May 2021 07:55
Forum: DOS Batch Forum
Topic: A tool for managing multiple running dos batches
Replies: 8
Views: 709

Re: A tool for managing multiple running dos batches

what does this TASKKILL command do? H:\>taskkill /? TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F] Description: This tool is used to terminate tasks by process id (PID) or image name. Parameter List: /S system Specifies the remote syst...
by Squashman
05 May 2021 20:44
Forum: DOS Batch Forum
Topic: A tool for managing multiple running dos batches
Replies: 8
Views: 709

Re: A tool for managing multiple running dos batches

TASKLIST with verbose output will also show you what you want. Then you can use TASKKILL.
by Squashman
05 May 2021 20:39
Forum: DOS Batch Forum
Topic: How to get MD5 hash only (Batch Script)
Replies: 1
Views: 422

Re: How to get MD5 hash only (Batch Script)

So you failed to search Stack overflow for an answer to your question.
https://stackoverflow.com/questions/674 ... tch-script
And you failed to search our forum here as well.
viewtopic.php?t=7592
by Squashman
26 Apr 2021 10:56
Forum: DOS Batch Forum
Topic: Taskkill %0
Replies: 6
Views: 805

Re: Taskkill %0

If you are scheduling this to run with Windows Task Scheduler it has this functionality built-in to the task creation. You just need edit the appropriate settings in the scheduled task.
by Squashman
25 Apr 2021 21:10
Forum: DOS Batch Forum
Topic: bat file dont run
Replies: 3
Views: 615

Re: bat file dont run

Sperhak wrote:
24 Apr 2021 14:06
Many thanks, work.
Please consider reading the help file for a command before asking questions. The help file literally explains the single and double percent usage on the 8th line.
by Squashman
23 Apr 2021 13:47
Forum: DOS Batch Forum
Topic: output computer, AD User
Replies: 4
Views: 710

Re: output computer, AD User

Is there a question? I don't see anything syntactically wrong with your code.
by Squashman
22 Apr 2021 14:16
Forum: DOS Batch Forum
Topic: Delete specified multiple lines of a not in use batch file through another batch file?
Replies: 4
Views: 1468

Re: Delete specified multiple lines of a not in use batch file through another batch file?

You should consider a redesign of the functionality of your script. It would be better if you kept your Games as a list or in a separate file. Then use a script to iterate that list or file to make a Menu system. Here is an example of creating the list within a FOR command. @echo off setlocal Enable...
by Squashman
19 Apr 2021 11:22
Forum: DOS Batch Forum
Topic: Get all column data in csv file (from column 100 to column 110, 150)
Replies: 12
Views: 1127

Re: Get all column data in csv file (from column 100 to column 110, 150)

As was already stated, this has nothing to do with JAVA, so the screenshot of that is irrelevant.

Also, please always post code, input and output as text in your responses instead of screen shots.
by Squashman
15 Apr 2021 01:05
Forum: DOS Batch Forum
Topic: Get all column data in csv file (from column 100 to column 110, 150)
Replies: 12
Views: 1127

Re: Get all column data in csv file (from column 100 to column 110, 150)

Comet297 wrote:
14 Apr 2021 20:05

3. I try put test.csv, out.csv into C:\ and changed (set "infile=C:\test.csv", set "outfile=C:\out.csv")

Have any wrong of my operation?

Best regards,
Comet
That capability has not existed without elevated privileges' since Windows Vista. So roughly 15 years.