Search found 239 matches

by pieh-ejdsch
27 Jan 2019 15:15
Forum: DOS Batch Forum
Topic: Check and identify Lin Files by contents
Replies: 4
Views: 4382

Re: Check and identify Lin Files by contents

Hello sajjansinghania, this may help You. @echo off setlocal set prompt=$g$s rem ich verschiebe Versionierte Backups in GOOD und gleiche in den Eimer rem hier: Kontrolle auf doppelte Backup Dateien :: -------------------------------------------------------------------------- rem Folder pushD "D:\CMD...
by pieh-ejdsch
25 Jan 2019 12:55
Forum: DOS Batch Forum
Topic: A Little project backing up folders
Replies: 2
Views: 3179

Re: A Little project backing up folders

Hello Stevo, I once had a similar requirement, with just a backup should be divided into several media. Maybe this can help you here. Please test it and let me know. If you need it I can provide an English version. https://administrator.de/forum/robocopy-quelle-mehrere-festplatten-190668.html#commen...
by pieh-ejdsch
25 Jan 2019 08:59
Forum: DOS Batch Forum
Topic: robocopy help please
Replies: 5
Views: 5740

Re: robocopy help please

hello miket11, I scrubbed something together. You can use it to transfer your files. Several backups can be created one behind the other. No existing data in the original folder will be overwritten - if at least in the first backup this file was not moved. If you want to move these files correctly, ...
by pieh-ejdsch
14 Jan 2019 17:08
Forum: DOS Batch Forum
Topic: robocopy help please
Replies: 5
Views: 5740

Re: robocopy help please

Hi,
I have to admit it sounds pretty undecided what you want exactly now.
I do not want to advertise, but maybe this can help you.
viewtopic.php?t=7903#p52948
by pieh-ejdsch
28 Dec 2018 06:55
Forum: DOS Batch Forum
Topic: compare by date/time
Replies: 2
Views: 3088

Re: compare by date/time

Hello sajjansinghania,

you can use robocopy /?

Phil
by pieh-ejdsch
04 Nov 2018 10:45
Forum: DOS Batch Forum
Topic: Code snippet inadvertently prevents console title renaming
Replies: 3
Views: 3862

Re: Code snippet inadvertently prevents console title renaming

Hello Quisquose, 2. Try writing the shortcut like this: cmd /k "prompt $g $S & pushD "C:\Users\username\Desktop\CMD test" & title "Rebuild Icon Cache" & color d1 & Program & prompt Testing-prompt $g" You either have to enter the path into the variable Path or use PushD to switch to the directory whe...
by pieh-ejdsch
03 Nov 2018 08:16
Forum: DOS Batch Forum
Topic: call expands variables / parameters differently with double percent signs
Replies: 1
Views: 2495

call expands variables / parameters differently with double percent signs

Hello Reader, The question was asked about the possibility to pass more than 10 parameters in one line. Do not be surprised %0 is also a parameter. When reading from all parameters, which are passed to the batch file, I am not quite satisfied with some solutions. For more than 10 parameters, you mus...
by pieh-ejdsch
13 Sep 2018 10:53
Forum: DOS Batch Forum
Topic: Show date in order I want it to
Replies: 4
Views: 4914

Re: Show date in order I want it to

in this Forum you can Search for
timestamp

Phil
by pieh-ejdsch
02 Sep 2018 10:53
Forum: DOS Batch Forum
Topic: Exist in /s "directory"doesn't work
Replies: 12
Views: 9182

Re: Exist in /s "directory"doesn't work

than use xcopy Note: Xcopy /L /U /Y /D:m-t-y ... does not check whether the target file is more up-to-date, but outputs the source file name if the specified date is the same as or older than the source file and the target file is also present. Only: Xcopy /L /U /Y /D ... this will Output all NOT up...
by pieh-ejdsch
01 Sep 2018 00:02
Forum: DOS Batch Forum
Topic: Exist in /s "directory"doesn't work
Replies: 12
Views: 9182

Re: Exist in /s "directory"doesn't work

Hello
A small modification

Code: Select all

@echo off
pushD %userprofile%\desktop\F2
for /r %%i in ( *.pdf ) do (
  if exist "..\F1\%%~nxi" ( move /y "..\F1\%%~nxi" ..\F3
  ) else echo File %%~nxi is not a duplicate
)
popD
Phil
by pieh-ejdsch
28 Aug 2018 10:27
Forum: DOS Batch Forum
Topic: foolproof counting of arguments
Replies: 56
Views: 103031

Re: foolproof counting of arguments

instead of start "" / b ...
what happens if you
do it without /b?

Phil
by pieh-ejdsch
21 Jul 2018 01:03
Forum: DOS Batch Forum
Topic: Delete lines based upon string or file
Replies: 9
Views: 8038

Re: Delete lines based upon string or file

ups my mistake.
I forgot that filenames should be used in the for /f loop with the usebackQ option.
this damn cellphone.
by pieh-ejdsch
20 Jul 2018 09:27
Forum: DOS Batch Forum
Topic: Delete lines based upon string or file
Replies: 9
Views: 8038

Re: Delete lines based upon string or file

used a combination with a for / f loop and a normal for loop. in the filter file can end semicolon, comma and space. in between, however, not - as well as no special characters like & () *? <> = | " >tempFilterFile ( @ for /f "delims=" %%i in ("filterFile") do @ ( for %%j in (%%i) do @ echo %%i ) ) ...
by pieh-ejdsch
19 Jul 2018 13:55
Forum: DOS Batch Forum
Topic: Delete lines based upon string or file
Replies: 9
Views: 8038

Re: Delete lines based upon string or file

if you use the file, without a concluding comma at the end of the line, you can also filter it with

Code: Select all

findstr /v /g:filterFile inputfile >outfile
Phil
by pieh-ejdsch
18 Jul 2018 11:56
Forum: DOS Batch Forum
Topic: Replacement of Operator
Replies: 10
Views: 8176

Re: Replacement of Operator

Hello,
You only make this special replacement by

Code: Select all

:replace
for /f "tokens=1*delims=~" %%i in ("!vheader!") do (
  if .%%j neq . (
    set "vheader=%%i","%%j"
    goto :replace
  )
)
echo !vheader! 
Phil