|
Pass 2 variables into dos FOR command
|
| |
Hi I'm just wondering if there is a way to pass 2 variables into the dos For command. I'm trying to script updating a scheduled job across multiple servers, so each will have separate start time. for /F %%i in (NDC.txt Times.txt) do CALL SchTask.bat %%i %%j "%AdminPass%" Schtasks /change /s \\%1 /U %1\administrator /P %3 /TN IISLogArchiver /... more »
|
|
piping into set /p
|
| |
"C:>echo 123 | set /p xyz=" at a cmd prompt doesn't set/change "xyz". Is there another way to set a variable from piped standard input (without temp files etc)? Question is related to [link], and could have interesting uses inside a "for" with enabledelayedexpansion, for example... more »
|
|
Checking whether parameter is a drive letter
|
| |
Suggestions are invited on the simplest and most reliable way (in a BAT file command script) to check whether a command-line parameter (e.g. %1 or %2) designates a valid drive letter (with its colon, e.g. C: or D: )? - Rich
|
|
Copy with Rename Question
|
| |
Looking for a solution on how to copy files from one folder to another while renaming them with a longer filename on Win XP Pro SP2 and Server2k3 platforms. I thought I was fairly command prompt 'competent' but this one has me stumped! Maybe I'm just having a senior moment. Hehehe. My source folder contains a set of target files beginning with the same root... more »
|
|
special characters in for /d do call
|
| |
Following are a couple of questions about quoting and escaping directory names which contain special characters (^, &, %). The following .bat recursively displays the directory names under a root passed as %1 on the command line. ---- @echo off ...call :dir ^"%%~1^" for /d %%d in ("%~1\*") do @%0 "%%~d"... more »
|
|
why can't i get variable value?
|
| |
i have a file called "IsPathRelative.bat". it's usage like : IsPathRelative.bat yourpath, it'll set IsPathRelative=True if the path i passed in is a relativepath(not very accurate,but works for me) else set IsPathRelative=False i call this bath file in another batch file. ... get path1, path2 call IsPathRelative.bat path1... more »
|
|
Detect Restart from Hybernate or Stand By
|
| |
Is there a way to detect restarting from hybernate or stand by states that I could use to run batch files? My laptop has a mouse touchpad controller applet that puts an icon into the system tray. I'm in the habit of hiding that icon whenever it appears. It appears every time my laptop restarts from hybernate or... more »
|
|
how to pass commandline arguments that with blank space to a batch file?
|
| |
i need to pass a folder path to a batch file ,as we know it may contains blank space. at first i thought maybe i could add quote around the arguments, but it proved to be failed. mybatch.bat "D:\some folder\sub folder" i get this error "folder\sub was unexpected at this time". how to get round this? thanks in advance... more »
|
|
Batch file to show Network drives
|
| |
See "net use" and "If exist" in Windows Help and support. Also there is a cmd prompt group that has some pretty sharp folks(cross posting this) news://msnews.microsoft.com/mi crosoft.public.win2000.cmdprom pt.admin
|
|
|