Search found 3679 matches

by Squashman
19 Apr 2018 21:30
Forum: DOS Batch Forum
Topic: running multiple ssh commands in a batch file
Replies: 7
Views: 54

Re: running multiple ssh commands in a batch file

When you were reading the documentation for plink did you stumble upon the -m option?
by Squashman
19 Apr 2018 07:57
Forum: DOS Batch Forum
Topic: Try to read folder name then output partial name of the folder as variable
Replies: 5
Views: 61

Re: Try to read folder name then output partial name of the folder as variable

I don't know how to better explain that the changes you made to the FOR /F command that I gave you will not work. If you use the FOR /F command as I posted in my code it will work.
I am tapping out of this thread.
by Squashman
19 Apr 2018 07:55
Forum: DOS Batch Forum
Topic: Can anyone help on extending a command.
Replies: 31
Views: 386

Re: Can anyone help on extending a command.

I am tapping out!
by Squashman
18 Apr 2018 14:24
Forum: DOS Batch Forum
Topic: Can anyone help on extending a command.
Replies: 31
Views: 386

Re: Can anyone help on extending a command.

pen pen Donno what im doing wrong but done everything you said and it just not having it. I had found this .cmd script on internet and tried it out and it works and does 70% of what I need to do. It launches DOS as expected and asks for a password. Trouble im having is its asking for password on ev...
by Squashman
18 Apr 2018 14:08
Forum: DOS Batch Forum
Topic: Try to read folder name then output partial name of the folder as variable
Replies: 5
Views: 61

Re: Try to read folder name then output partial name of the folder as variable

What was wrong with using the FOR /F command as I provided it to you. Pretty sure it works the way you described your output in your first post in this thread. Let's just test that from the cmd prompt real quick. I:\>FOR /F "TOKENS=3* delims=-" %H in ("T501-08700-0100-T3_QA_Infra-SL_0102_signed_SL_K...
by Squashman
18 Apr 2018 11:19
Forum: DOS Batch Forum
Topic: Try to read folder name then output partial name of the folder as variable
Replies: 5
Views: 61

Re: Try to read folder name then output partial name of the folder as variable

Code: Select all

pushd C:\auto_pkg_build\Sources\Source_schemes\QA_Infra
for /D %%G in (*) DO (
    FOR /F "TOKENS=3* delims=-" %%H in ("%%~G") DO echo %%I
)
popd
by Squashman
18 Apr 2018 06:05
Forum: DOS Batch Forum
Topic: Can anyone help on extending a command.
Replies: 31
Views: 386

Re: Can anyone help on extending a command.

It mentions 7ZA.exe and looking for it. Ive looked in C\PROGRAM FILES\7ZIP and cant see 7xa.exe folder anywhere. Am I missing it? Ive downloaded the program from the internet. Your very first post in this thread said you were using 7zA.exe. Hi I have the following command of which at present it loo...
by Squashman
17 Apr 2018 19:35
Forum: DOS Batch Forum
Topic: Can anyone help on extending a command.
Replies: 31
Views: 386

Re: Can anyone help on extending a command.

You have already been shown how to zip the folder and password protect the folder. What are you not understanding from the previous help you have been given.
by Squashman
17 Apr 2018 06:13
Forum: DOS Batch Forum
Topic: Can anyone help on extending a command.
Replies: 31
Views: 386

Re: Can anyone help on extending a command.

Why the switch to VBscript?
by Squashman
16 Apr 2018 10:48
Forum: DOS Batch Forum
Topic: Need help on finishing off a .bat command
Replies: 4
Views: 76

Re: Need help on finishing off a .bat command

So it is naming the zip file the name of the directory it is zipping. The folder name it is zipping is stored in this variable: "%%X". So what would you do to this code: "%%X.zip" to add the output path to it? Penpen showed you how to do it in your last thread. https://www.dostips.com/forum/viewtopi...
by Squashman
16 Apr 2018 09:44
Forum: DOS Batch Forum
Topic: Need help on finishing off a .bat command
Replies: 4
Views: 76

Re: Need help on finishing off a .bat command

You were told in your previous question how to get prompted to password protect the zip file.
by Squashman
13 Apr 2018 13:35
Forum: DOS Batch Forum
Topic: Can I do a autorun command for moving folders
Replies: 4
Views: 86

Re: Can I do a autorun command for moving folders

You have used the term AutoRun in both of your questions on the forum, but in my opinion you are using the wrong terminology. AutoRun used to deal with programs running when you inserted removable media. That functionality was removed from Windows a while ago. So can you explain to us what you mean ...
by Squashman
13 Apr 2018 10:40
Forum: DOS Batch Forum
Topic: how to read filename from folder then output as variable?
Replies: 6
Views: 106

Re: how to read filename from folder then output as variable?

aGerman wrote:
13 Apr 2018 10:23
-17 :?: It was 17 in your initial post

Steffen
If my memory serves me correctly, I believe it was

Code: Select all

set var=%var:0-17%
My brain probably interpreted that as wanting characters 0 to 17.
by Squashman
13 Apr 2018 10:27
Forum: DOS Batch Forum
Topic: how to read filename from folder then output as variable?
Replies: 6
Views: 106

Re: how to read filename from folder then output as variable?

1) Debug the script. Remove the redirection and actually see if you are getting any output from the FOR command. 2)Show us real world examples of your file names. 3) Based on the obfuscated file name example you have given, you could just split the file name at the first underscore. @echo off if exi...
by Squashman
13 Apr 2018 09:46
Forum: DOS Batch Forum
Topic: how to read filename from folder then output as variable?
Replies: 6
Views: 106

Re: how to read filename from folder then output as variable?

Should I go back and show you all your questions that we mentioned Delayed Expansion to you. But you do have a syntax problem with your substring in the SET command. I would bet we have shown you the proper syntax for that as well in plenty of your questions. set var=!var:~0,17! From one of your ver...