Все вопросы: [cmd]

231 вопросов

похожие теги: python-cmdsencha-cmd
0
голосов
1ответов
348 просмотров

Robocopy CLI syntax won't work

I just recently saw that xcopy is deprecated and that Robocopy is recommended. I tried moving files with it, but couldn't get it to work. I tried moving files from C:\Downloads\Temp to F:\Temp Both folders had no files directly under them. Downloads\Temp has about 20 folders, some of which have...

1
голосов
2ответов
4897 просмотров

Passing paths to cmd using ProcessStartInfo not working as intended

Im using Process and ProcessStartInfo to launch a cmd window with the usual redirected output etc. However i'm tring to launch a command line executable with arguments, and even though the string is correct when i echo it to the cmd, when i run it without echo i get "'C:\Program' is not a recogni...

18
голосов
2ответов
60535 просмотров

How can I create a shared folder from the Windows command line?

As far as I'm aware, this is done via the net command. However, the help section isn't very helpful, as it only shows me the secondary options and not how to use those. Suppose I had a folder C:\Share_test How would I make it shared from the command line?

3
голосов
1ответов
499 просмотров

Windows Scripting: What and How to do this? Batch Files or Something else?

What I am trying to do is have some sort of script run in windows (ideally .cmd file/batch file) when double clicked it should create a short-cut menu in the start menu and set a path in the windows registry (i think thats what it is called) so that next time, for example, all I have to is get th...

7
голосов
5ответов
51569 просмотров

CMD Script: How to close the CMD

I have created a small command that will let me launch Internet Explorer. However, I wish to close the small command prompt that shows up when I launch IE. How can I do this? This is my current code: "%ProgramFiles%\Internet Explorer\iexplore.exe" http://localhost/test.html PAUSE I am guessing...

8
голосов
6ответов
28220 просмотров

Windows batch file - The system cannot find the batch label specified

The Problem I'm having a problem with a Windows batch file and labels. I keep getting this error: The system cannot find the batch label specified What I've tried Two computers; a WindowsXP and a 2003 Server. Made sure it was encoded as ASCII Editted the hex code for the line continuat...

35
голосов
2ответов
157943 просмотров

How to input a string from user into environment variable from batch file

I want to prompt the user for some input detail, and then use it later as a command line argument.

1
голосов
4ответов
4131 просмотров

Windows XP batch file concat

I'm trying to accomplish the following ridiculous task: I have a text file containing a set of fully qualified filesnames. I want to iterate through the file and append each line to a common variable, that can be passed to a command line tool. For example, the file might be: C:\dir\test.txt C:\W...

2
голосов
5ответов
2876 просмотров

Should I use PowerShell or CMD.exe for this?

What should I use to accomplish the task desribed below? CMD.exe? PowerShell? Windows Script Host with VBScript or JScript? Task: transverse into every sub-folder of a folder if the subfolder has a folder name XXX, invoke certain commands

1
голосов
1ответов
665 просмотров

why can't I run CMD for command like this:

for /f %%i in ('someprogram %1 2>&1 | find /c "some string"') do ... it says 2>&1 was unexpected at this time

8
голосов
1ответов
30366 просмотров

How to log text displayed in a Windows XP command line application

Is there a simple way to log everything that appears on the command line on Windows? I have a batch file that is running some things, but everything flies by so fast I cannot see if any errors have occurred.

89
голосов
7ответов
235094 просмотров

Get user's non-truncated Active Directory groups from command line

I often use the net user command to have a look at AD groups for a user: net user /DOMAIN <username> This works well, however the group names are truncated to around 20 characters. And in my organization, most group names are much longer than this. Does anyone know of a way to get non-...

2
голосов
2ответов
449 просмотров

PNRP Global_ stuck on Alone

I have two installations of Windows 7. a 64bit version on my hard disk, and a 32bit version installed as a bootable VHD. on my the 64bit version, I can't get my PNRP Global_ cloud out of Alone state. on my the 32bit version, I can get it in Active state by registering a peer however I can't res...

191
голосов
7ответов
277583 просмотров

Running Windows batch file commands asynchronously

Say, if I have foo.exe bar.exe baz.exe How do I run all of them from a batch file asynchronously, i.e. without waiting for the previous program to stop?

11
голосов
6ответов
37377 просмотров

Search for files in a batch script and process those files?

I'm trying to do some things during the pre-build phase of a visual studio project. Specifically, I'm trying to execute some commands on all *.resx files within the project. Here is what I have but it doesn't work when the files/directory path have a space in them. How do I get around these sp...

2
голосов
1ответов
789 просмотров

Python cmd module command aliases

I am making a command line interface in Python 3.1.1 using the cmd module. Is there a way to create a command with more than one name e.g. "quit" and "exit"? Or would it just be a case of making a number of commands that all reference the same function?

3
голосов
4ответов
597 просмотров

Porting shell functions to cmd.exe: Is it possible to automatically source scripts on startup?

I'm porting a Linux tool-set that makes frequent use of shell functions to provide certain functionality. These functions are automatically sourced when you start a new shell and include things like changing the working directory, which is nigh impossible with stand-alone programs because child p...

5
голосов
3ответов
3939 просмотров

gcc and g++ command prompt compiling and linking

Hey there, I have a small problem with compiling and linking with the command prompt(windows xp). Every .c file and .cpp file I compile or link has to be in the same directory as gcc (C:\Program Files\gcc\bin) and its quite hard to keep track of my files among all those gcc related files and its ...

3
голосов
3ответов
7956 просмотров

reset IIS remotely

I'm going to reset IIS through a batch file. Using iisreset utility, as the batch file will be used by others who may log in the domain without the administrator account of the target server. How can I make the batch script running with proper permission? Thanks in advance! And I also don't want...

4
голосов
4ответов
3690 просмотров

Which is better to use for a recurring job: Service or Scheduled Task?

I have a task that needs to run every 30 seconds. I can do one of two things: Write a command line app that runs the task once, waits 30 seconds, runs it again and then exits. I can schedule this task with Scheduled Tasks in Windows to run every minute Write a Service that runs a task repeatedl...

5
голосов
3ответов
3834 просмотров

How would you write a .bat or .cmd file to remove an element from the PATH?

Related: How to list the elements of the path in a batch file? How does FOR work? How would you write a batch file or CMD file to remove an element from the path? It should handle gracefully: differences in case shortnames and long names I've done this using tr.exe but it's slow and compl...

53
голосов
5ответов
84052 просмотров

Batch file encoding

I would like to deal with filename containing strange characters, like the French é. Everything is working fine in the shell: C:\somedirC:\somedirdirgt;ren -hÚlice hÚlice gt;ren -hélice hélice I know if I put this line in a .bat file, I obtain the following result: 12321 See ? é have been r...

1
голосов
2ответов
4469 просмотров

How to extract numbers from text file using Windows batch file?

I need to do the following using cmd (Windows command line). I have one file named DDD.CLI026.WK0933.DDDMR45.001.head. The data in file is as follwing (in one long line) HEAD HEALTHDMD Weekly DDD.CLI026 Centocor W200908021012 TRAIL0101 000000000581 00000CKSUM00000223680 I need to extract ...

0
голосов
5ответов
1069 просмотров

In a batch file, is it possible to replace this use of SED and TR with a for loop?

the batch file: @echo. @set curdrive=%~d0 @path | %curdrive%\utils\sed -e "s/PATH=//" | %curdrive%\utils\tr ; \n @echo. Sample output (one path element on each line): C:\cheeso\bin C:\Perl\bin c:\utils C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem c:\Program Files\Microsoft SQL Ser...

700
голосов
7ответов
476273 просмотров

Redirect Windows cmd stdout and stderr to a single file

I'm trying to redirect all output (stdout + stderr) of a DOS command to a single file: C:12321gt;dir 1> a.txt 2> a.txt The process cannot access the file because it is being used by another process. Is it possible, or should I just redirect to two separate files?

0
голосов
1ответов
1480 просмотров

Windows prompt: ISO 8601 date?

How do I set the command line prompt in Windows to display current ISO 8601 date and time (e.g. 2009-09-08T13:01:56) instead of the default of current directory? Update. Set it by: right click My Computer/Properties/tab Advanced/Environment Variables/System Variables/New/ Variable name=PROMPT an...

2
голосов
4ответов
4459 просмотров

windows cmd connection to remote mysql dbf

is there a way of how to connect to mysql dbf on a remote server and run sql queries using windows command line?

4
голосов
1ответов
2366 просмотров

How to get the robocopy(or other cmd program) output in a WINForm?

I have a GUI program, which would call a cmd in this GUI program. In my case, the GUI call the robocopy to copy the file to a file server.And I want to show the progress in the GUI. So how can I get the output of the robocopy and display it on my GUI. Best Regards, Yongwei Xing

2
голосов
1ответов
15036 просмотров

Creating msbuild script to build, publish with specified app.config, and update from different locations

I have googled everywhere for this solution and cannot find anything! I want to have a msbuild script to do the following: Build the project solution Publish the built solution with the specified app.config (app.config.debug or app.config.release) to a specified folder (Development or Producti...

2
голосов
6ответов
1097 просмотров

keep cmd open while running a file

I'm learning C++ and I'm using Visual C++ Express and while running this #include <stdio.h> int main() { printf("Hello, World!\n"); return 0; } the cmd window closes so fast, I can't see Hello World is there anyway to prevent this?