Search found 227 matches

by pieh-ejdsch
21 Jun 2020 12:21
Forum: DOS Batch Forum
Topic: Repetitively read x lines from txt file and pass to called program
Replies: 1
Views: 264

Re: Repetitively read x lines from txt file and pass to called program

Hallo Bryan, Your example has only 34 lines ... I would not read the lines, but always read the first block line. Look for the 4-digit number and create the file with this number. Then transfer to the processing program. The last file is treated at the end - or the first line of the original file is...
by pieh-ejdsch
14 Jun 2020 05:07
Forum: DOS Batch Forum
Topic: Recursively Delete File Types From A Named Folder Only
Replies: 2
Views: 373

Re: Recursively Delete File Types From A Named Folder Only

you can use a for /r loop in a recursive search

Code: Select all

( for /d /r %%a in (Target-Folder.?) do @ DEL /S /Q "%%a\*.psr" "%%a\*.zip" ) >Deleted-psr-zip.txt 2>&1
Phil
by pieh-ejdsch
03 Jun 2020 09:01
Forum: DOS Batch Forum
Topic: How to add 'del ' as leading sttring of all lines of a file ?
Replies: 2
Views: 432

Re: How to add 'del ' as leading sttring of all lines of a file ?

vorticity wrote:
02 Jun 2020 12:10
My problem: writing file1.jpg file2.jpg ... into a file for the ftp_delete_script is easy...
You write this into this - how?
Manually...
Is a list with this files there?

Phil
by pieh-ejdsch
01 Jun 2020 10:29
Forum: DOS Batch Forum
Topic: Copy files do not overwrite existing
Replies: 11
Views: 14289

Re: Copy files do not overwrite existing

First you create a list of the files to be excluded. Only those that are in the source and the destination are listed. So the command backwards xcopy /LUY target source Just a bit with showing the source files. You add this to your correct command as an exclusion list. @echo off setlocal set prompt=...
by pieh-ejdsch
23 May 2020 13:23
Forum: DOS Batch Forum
Topic: Self Updating Continuously Running Batch
Replies: 7
Views: 776

Re: Self Updating Continuously Running Batch

This batch does not use a label and can be changed easily, so it is the changeable second part. Only a copy is made in a subfolder, which then runs and runs ... @ rem Don't change this part @echo off setlocal rem Endless update part. This part controls the copying/updating of the batch. rem The batc...
by pieh-ejdsch
17 Apr 2020 11:59
Forum: DOS Batch Forum
Topic: How to make a scanner that scans a batch file?
Replies: 3
Views: 1639

Re: How to make a scanner that scans a batch file?

A simple first checkCMD.cmd that was started, which was created to find corresponding commands, variables, brackets, parameters etc. in batch files, is here. The output contains the numbers and the line found. This script can be easily expanded and new parameters and corresponding search terms can b...
by pieh-ejdsch
12 Apr 2020 16:32
Forum: DOS Batch Forum
Topic: Can't parse arguments to variable
Replies: 5
Views: 1876

Re: Can't parse arguments to variable

The comparison with your IF line does not work out as you would expect. If you want to know what goes wrong then you have to evaluate the displayed errors. For successful troubleshooting, it has proven useful to switch on the echo and thus to find something in the last displayed lines that leads to ...
by pieh-ejdsch
11 Apr 2020 09:11
Forum: DOS Batch Forum
Topic: Runaway problem with FINDSTR "Line {nnn} is too long"
Replies: 1
Views: 1377

Re: Runaway problem with FINDSTR "Line {nnn} is too long"

This is definitely the 2 GB limit. Since nothing can be written into the files with certainty, each file must be considered for itself. A line must be searched for without a line end, and at the same time the error message must be evaluated. You can even calculate how long this line is, for example....
by pieh-ejdsch
09 Mar 2020 07:11
Forum: DOS Batch Forum
Topic: batch file to move all files from one folder to another
Replies: 3
Views: 2211

Re: batch file to move all files from one folder to another

Hello Bob,
please search for MoveintTree

Phil
by pieh-ejdsch
10 Feb 2020 05:43
Forum: DOS Batch Forum
Topic: Subtract files from a folder
Replies: 1
Views: 3494

Re: Subtract files from a folder

What is diff?
Which specific (different) content have these files?
Test this
viewtopic.php?p=60645#p60645
or You can try doublettes finder?
by pieh-ejdsch
08 Feb 2020 15:43
Forum: DOS Batch Forum
Topic: [SOLVED] Script to older version of files when new ones are copied in?
Replies: 7
Views: 4768

Re: Script to older version of files when new ones are copied in?

There are already some useful scripts here. There is sure to be more.

File Versioning with Timestamp:viewtopic.php?t=7903#p52948

Make Backup cycle:
viewtopic.php?t=8956#p58728
by pieh-ejdsch
26 Jan 2020 00:26
Forum: DOS Batch Forum
Topic: best way to encrypt passwords in cmd files?
Replies: 9
Views: 3368

Re: best way to encrypt passwords in cmd files?

Maybe you shouldn't call the variable password.
More like count files or something.
Give the password file restricted / explicit user rights.
by pieh-ejdsch
25 Jan 2020 13:33
Forum: DOS Batch Forum
Topic: Check files GEQ 11000
Replies: 1
Views: 1576

Re: Check files GEQ 11000

Hallo Zero0,
Your script does not show how which variables are set, you can only assume that they are set. There is no If Else for either a directory, or in a loop, or recursively.
You can use a for /r loop for this.
Please use Code Tags.