Search found 4021 matches

by Squashman
21 Feb 2020 10:28
Forum: DOS Batch Forum
Topic: File List script adding filelist
Replies: 2
Views: 3533

Re: File List script adding filelist

You got several options but will require more code. 1) Write the output file to a temp folder and then move it back to the folder you want. 2) Write the output file to a temp file name and then rename it back to the file you want. 3) Capture the output of the DIR command piped to the FIND command wi...
by Squashman
11 Feb 2020 08:33
Forum: DOS Batch Forum
Topic: delete the last caracter for each line of the generated file
Replies: 2
Views: 4028

Re: delete the last caracter for each line of the generated file

Hello all :) , I have a DOS Batch that export data from an application, After this export I get a ".csv" that end by a semicolon, I want to delete this semicolon for each line, Thanks in advance, Please show us the code you are already using so we are not guessing at any possible solutions to your ...
by Squashman
07 Feb 2020 18:26
Forum: DOS Batch Forum
Topic: Copy name
Replies: 27
Views: 9518

Re: Copy name

I don't want to copy their filenames, I'd like to have a Windows Explorer selection of these files, so I can copy, cut or delete them How was anybody on this planet supposed to ascertain that from your original post. Hi, Greetings to all users of this forum I need help to modify this command cmd /c...
by Squashman
05 Feb 2020 10:52
Forum: DOS Batch Forum
Topic: Copy name
Replies: 27
Views: 9518

Re: Copy name

celsius wrote:
05 Feb 2020 10:45
Yes, it works well as context menu. Again, as button, the variable is not expanded
Then you are going to have to work with the developer of Open Shell.
by Squashman
05 Feb 2020 10:13
Forum: DOS Batch Forum
Topic: Batch to wipe / default Win10
Replies: 2
Views: 3543

Re: Batch to wipe / default Win10

ShadowThief wrote:
03 Feb 2020 13:24
If you don't have time to do it correctly, you're going to waste more time by fixing the side effects of doing it incorrectly.
Agreed.

If you are in a domain environment, Microsoft has already given you all the tools to accomplish this. You just need a competent admin to set it up.
by Squashman
05 Feb 2020 10:06
Forum: DOS Batch Forum
Topic: batch script to skip file is file name contains a specific prefix
Replies: 1
Views: 3060

Re: batch script to skip file is file name contains a specific prefix

Your code is comparing 13 characters of the file name to 4 characters of your prefix string. That will never be true.
by Squashman
05 Feb 2020 10:02
Forum: DOS Batch Forum
Topic: Copy name
Replies: 27
Views: 9518

Re: Copy name

Look at Context Menu options using CMD.exe or Powershell
In my first example it would be extremely easy to change it from copying the file path to just the file name.
by Squashman
31 Jan 2020 23:10
Forum: DOS Batch Forum
Topic: Quoting Issue
Replies: 2
Views: 2771

Quoting Issue

I guess I have spent so much wasted time working in RedPoint that I completely forgot how to write a batch file. This does not work. W:\>FOR /F "TOKENS=2" %G IN ('"C:\Program Files\WinZIP\wzunzip.exe" -vt ABC1NFD_20200127.zip ^|findstr /E /C:"_P.txt"') DO @echo %G 'C:\Program' is not recognized as a...
by Squashman
30 Jan 2020 17:31
Forum: DOS Batch Forum
Topic: Bug/Mystery in the phase parsing rules 1.5 and 2 CR vs redirect
Replies: 28
Views: 8417

Re: Bug/Mystery in the phase parsing rules 1.5 and 2 CR vs redirect

Seriously, why don't we send a nicely worded email to one of the people at the Microsoft Command Line Blog and see if they will chime in on this.
by Squashman
21 Jan 2020 09:41
Forum: DOS Batch Forum
Topic: right click command line help
Replies: 7
Views: 2469

Re: right click command line help

So you are using the SENDTO option of the context menu?

The syntax for the command is
ViewCompanion /c format inputfile outputfile

So ShadowThief gave you the correct syntax for using the command modifiers.

ViewCompanion /c pdf "%~1" "%~dpn1.pdf"
by Squashman
14 Jan 2020 15:44
Forum: DOS Batch Forum
Topic: Sync from a list file with
Replies: 6
Views: 3964

Re: Sync from a list file with

The DIR /B /S command would include a full path in the output. In the script you are appending that information to the source folder. Xcopy would fail because the input path is invalid.
by Squashman
30 Dec 2019 08:31
Forum: DOS Batch Forum
Topic: measrue elapsed time
Replies: 4
Views: 1754

Re: measrue elapsed time

Userdosfx wrote:
28 Dec 2019 08:00
I need something like stopwatch examples
Not those examples
Explain to us how using GetTimeStamp or JTimeStamp does not working for you in a stopwatch like fashion.
by Squashman
18 Dec 2019 10:24
Forum: DOS Batch Forum
Topic: Enable and Start Service on entire subnet remotely
Replies: 2
Views: 1346

Re: Enable and Start Service on entire subnet remotely

Sounds to me like you just need a FOR /L loop and you are done for /l %%i in (1 1 254) do ( sc \\192.168.100.%%i config remoteregistry start= auto sc \\192.168.100.%%i start remoteregistry ) Steffen Essentially what I told them to do on SO . Fairly easy to understand how to use a FOR /L if you read...