Search found 38 matches

by MarioZac
04 Jun 2018 10:19
Forum: DOS Batch Forum
Topic: Batch file could not be found
Replies: 3
Views: 3590

Re: Batch file could not be found

Why did you Setlocal 3 times? :D

Try changing to

Code: Select all

set "folder=C:\PPI"
, and post any errors. It also depends where you execute the batch from and how exactly.
by MarioZac
04 Jun 2018 08:04
Forum: DOS Batch Forum
Topic: How to not merge folders already created
Replies: 5
Views: 4921

Re: How to not merge folders already created

Or modify the above snippet to prompt for new folder name:

Code: Select all

set /p "newFolderName=Enter new destination folder name > "
by MarioZac
03 Jun 2018 09:00
Forum: DOS Batch Forum
Topic: How to not merge folders already created
Replies: 5
Views: 4921

Re: How to not merge folders already created

Here you ask "how to merge files", and now you ask "how to NOT merge". Do you know exactly what you need? It looks like you're trying to learn basic coding skills by asking others to write script examples for you. Did you try bugging Google instead? Best thing is attempting to code yourself and pos...
by MarioZac
03 Jun 2018 08:49
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

If you change the topic title in your 1st post as discussed, I'll try to help you the last time. :wink: Do you need to merge newly downloaded content to already existing backup folders, or create new backup folders each time you move recent content? What naming rules do you want to use for the new f...
by MarioZac
02 Jun 2018 21:59
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

im not totally compitent yet by a long way. Never will be if not trying to do things yourself. Do you need to move only remaining files to Other1, or also remaining folders somewhere else? Your appetite for moving things grows by an hour. :D To change the topic title, you need to edit the 1st post ...
by MarioZac
02 Jun 2018 09:56
Forum: DOS Batch Forum
Topic: Stop Command Prompt Empty Line
Replies: 17
Views: 16531

Re: Stop Command Prompt Empty Line

Can you reveal just a little more of your actual code? :mrgreen:
by MarioZac
02 Jun 2018 09:09
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

There are always ways to do simple file operations in a batch. This forum is learning environment. You seems to be learning now how to check a batch code for execution errors. What is your extra code version? What errors does it give? Hint: consider setting Dest1 and Dest2 variables, and extra FOR a...
by MarioZac
31 May 2018 10:49
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

Try this script. @echo off setlocal set "source=O:\Temp\Other" & set "dest=O:\Temp\Other\btp" & set "prefix=B" for /d %%B in ("%dest%") do set "fold=%%~nxB" for /f "tokens=*" %%a in ('dir /b "%source%\%prefix%*"') do ( echo Moving "%%a" if exist "%source%\%%a\" ( xcopy "%source%\%%a" "%dest%\%%a" /s...
by MarioZac
30 May 2018 20:58
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 32756

Re: Dynamically change icon in context menu

Thanks for your input. Solution complexity should correspond to the task at hand, and switching Current Display sounds straightforward at user level. For now I'd leave it "as is", it works OK though not ideal. Will see if someone can come up with a native Windows Shell solution. Its interesting in g...
by MarioZac
30 May 2018 20:29
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

Pls READ above post #5. Try modifying your script as suggested, then report any errors printed in open Cmd window or discovered. :D UPDATE : The error the modified code prints: Cannot perform a cyclic copy . If the code doesn't work as expected, add Exit /b at the end and debug it in an open Cmd Pro...
by MarioZac
30 May 2018 11:52
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

Your task is now changed beyond recognition. :D Where is your archiving code snippet?

If %%a looks like x.7zip , and you try to copy %%a\*.* , which means x.7zip\*.* , would you expect XCOPY to look inside each 7zip archive? Try xcopy "%source%\%%a" "%dest%\%%a" - any issues?
by MarioZac
29 May 2018 15:18
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 32756

Re: Dynamically change icon in context menu

Thanks for the update. I need to go through your reply more in depth, but for now I can say, running DisplaySwitch.exe results in logging the same sequence of Microsoft-Windows-DisplaySwitch/Diagnostic Events each time regardless whether the display configuration changed or not, and how exactly. Whe...
by MarioZac
29 May 2018 09:27
Forum: DOS Batch Forum
Topic: Need help in amending a script.
Replies: 15
Views: 11075

Re: Need help in amending a script.

Pls add exit /b to the end of your batch, and then post errors printed in open Cmd Window, when running your current batch from that window? Pls post examples of full file names moved with your current script, and compare them to examples of full file names that were NOT moved, but you expect the sc...
by MarioZac
28 May 2018 08:32
Forum: DOS Batch Forum
Topic: How to mask a blank inside nested quotes?
Replies: 11
Views: 10099

Re: How to mask a blank inside nested quotes?

What are those blanks ........ for? Did you try "*.jpg" in FOR /R ? Did you test Echo your resulting variable values? When asking Qs, its better to explain what you try to accomplish with this code, since your code may contradict your goals, while you merely want to mask blanks in it.
by MarioZac
27 May 2018 20:29
Forum: DOS Batch Forum
Topic: Functional carriage return literal within a batch script!
Replies: 5
Views: 25170

Re: Functional carriage return literal within a batch script!

I wonder if someone noticed that adding CR| allows to execute commands as if they were typed on separate lines in a batch file, while in fact they're typed on the same line. Its useful when adding commandline to Registry. I couldn't find mentioning it anywhere. Examples: :: Add command sequence to a...