Search found 3690 matches

by aGerman
29 Jan 2010 11:50
Forum: DOS Batch Forum
Topic: How to make a pop-up?
Replies: 6
Views: 4154

Re: How to make a pop-up?

Hi beatboxx, normally the batch window is also your interface to show messages. But you could use the MSG command, like @echo off msg %username% My message. AFAIK those doesn't work higher than Win XP. If so, you could use an implemented VBScript, like @echo off &setlocal set mbox="%temp%\m...
by aGerman
28 Jan 2010 17:57
Forum: DOS Batch Forum
Topic: List all "Command Line" System Files - Compare to my list
Replies: 5
Views: 4002

Re: List all "Command Line" System Files - Compare to my list

Hi thr333, I will try to explain, but please note that English isn't my native language. So don't hesitate to ask if something isn't clear to you. @echo off &setlocal Hide the command prompt and limit the change in the environment to the current batch window. set "all=%temp%\all.txt" s...
by aGerman
28 Jan 2010 15:58
Forum: DOS Batch Forum
Topic: Defining a variable by user input for creating folder PSExec
Replies: 8
Views: 5202

Re: Defining a variable by user input for creating folder PSExec

Hi again, I tried it using PSexec. Say I have a Batchfile on my local PC with the following contents @echo off psexec \\remotepc -w C:\data C:\data\abc.bat pause and a "C:\data\abc.bat" on the remote computer contents @ECHO OFF SET /P "user= USERNAME: " md "%user%" cd &...
by aGerman
28 Jan 2010 09:23
Forum: DOS Batch Forum
Topic: Defining a variable by user input for creating folder PSExec
Replies: 8
Views: 5202

Re: Defining a variable by user input for creating folder PSExec

Localy once again. I created this batchfile on my desktop. @ECHO OFF SET /P "user= USERNAME: " md "%user%" cd "%user%" :: show where we are: echo %cd% pause returns: USERNAME: SUE C:\Documents and Settings\[***]\Desktop\SUE Press any key to continue . . . Will try with ...
by aGerman
28 Jan 2010 08:12
Forum: DOS Batch Forum
Topic: Defining a variable by user input for creating folder PSExec
Replies: 8
Views: 5202

Re: Defining a variable by user input for creating folder PSExec

[...] but ( cd "%user%" ) isnt executed.[...]


Hi HCV242.
Why not? :shock: Can't believe. Worked nicely for me. What kind of special characters are probably used for the username?

At home I will check it using PSexec.

Regards
aGerman
by aGerman
28 Jan 2010 06:21
Forum: DOS Batch Forum
Topic: Defining a variable by user input for creating folder PSExec
Replies: 8
Views: 5202

Re: Defining a variable by user input for creating folder PSExec

Hi HCV242,

mabe you've got a problem with blanks. Have you ever tried to use double quotes, like

Code: Select all

@ECHO OFF
SET /P "user= USERNAME: "
md "%user%"
cd "%user%"


Regards
aGerman
by aGerman
27 Jan 2010 15:08
Forum: DOS Batch Forum
Topic: Open file when full path is unknown. (Flash Cookies)
Replies: 4
Views: 3104

Re: Open file when full path is unknown. (Flash Cookies)

Hi JasonC. I don't know much about ftp and I can't test it. But the principle will be clear to me. IMHO you should write a temporary ftp-script by batch. Probably as following. @echo off &setlocal set "root=%APPDATA%\Macromedia\Flash Player\#SharedObjects" set "folder=www.example....
by aGerman
27 Jan 2010 02:32
Forum: DOS Batch Forum
Topic: need help passing a variable
Replies: 11
Views: 5456

Re: need help passing a variable

Hi sfgman63,

you have to call the function with the name of the returned variable as 2nd parameter.
If it should be hex, then

Code: Select all

call :toHex %dec% hex


Regards
aGerman
by aGerman
26 Jan 2010 16:33
Forum: DOS Batch Forum
Topic: Open file when full path is unknown. (Flash Cookies)
Replies: 4
Views: 3104

Re: Open file when full path is unknown. (Flash Cookies)

Hi JasonC. @echo off &setlocal set "root=%APPDATA%\Macromedia\Flash Player\#SharedObjects" set "folder=www.example.com" set "file=eg.sol" pushd "%root%" for /f "delims=" %%a in ('dir /ad /b /s^|findstr /l /i /e /c:"\%folder%"') do set &...
by aGerman
26 Jan 2010 13:05
Forum: DOS Batch Forum
Topic: The syntax of the command is incorrect.
Replies: 4
Views: 8365

Re: The syntax of the command is incorrect.

Would you write down an entire "faulty" line? Can't find any mistakes.

Regards
aGerman
by aGerman
26 Jan 2010 13:00
Forum: DOS Batch Forum
Topic: List all "Command Line" System Files - Compare to my list
Replies: 5
Views: 4002

Re: List all "Command Line" System Files - Compare to my list

Hi thr333. I see two ways. 1st Set each file name into a variable and 2nd Mark off each line to use FINDSTR for the own batch code. IMHO the second would be better. For testings: @echo off &setlocal set "all=%temp%\all.txt" set "missing=%temp%\missing.txt" type nul>"%all...
by aGerman
25 Jan 2010 17:49
Forum: DOS Batch Forum
Topic: List all "Command Line" System Files - Compare to my list
Replies: 5
Views: 4002

Re: List all "Command Line" System Files - Compare to my list

Hi thr333, first let me say there are a lot of mistakes in your list. Not every command is an EXE file. Some (like ECHO, FOR, TIME, PUSHD, POPD ...) are implemented to the command line interpreter, some other (like GRAFTABL, MODE, MORE ...) are COM files. So figure out on your system and change it. ...
by aGerman
24 Jan 2010 15:34
Forum: DOS Batch Forum
Topic: 2 "IF / ELSE" decisions, 4 combinations - reduce to 2 result
Replies: 2
Views: 2377

Re: 2 "IF / ELSE" decisions, 4 combinations - reduce to 2 result

Hi Alan. Maybe you could use regular expressions. For testing: @echo off &setlocal set /p "A=value for A: " set /p "B=value for B: " echo %A%:%B%|findstr /r /c:"^4:[^6]$" >nul 2>&1 &&call :default ||call :special pause goto :eof :default echo DEFAULT got...
by aGerman
22 Jan 2010 18:40
Forum: DOS Batch Forum
Topic: generic failure
Replies: 8
Views: 4918

Re: generic failure

Maybe option /f is placed wrong? Have a look to the command line reference (taskkill /?).

Code: Select all

taskkill /im Steam.exe /f /t
by aGerman
22 Jan 2010 18:23
Forum: DOS Batch Forum
Topic: Move Foldercontent in parent folder
Replies: 1
Views: 2035

Re: Move Foldercontent in parent folder

You can't use wildcards. But using DIR /S into a FOR /F loop will help surely. Figure out. @echo off for /f "delims=" %%a in ('dir /a-d /b /s *.mp3') do copy "%%a" "%%~nxa" You have to create the batch in "music". But note, ampersands in file names or folder n...