hi i running a batch file that opens a program and then deletes itself. however after the batch file runs the program it does not go to the next command
Ex.
syscontrol.exe
del set.bat
Syscontrol opens up without a window could that be the problem?
How are you launching the program? The correct way to do it would be -
start "" /b "path\to\syscontrol.exe"
the program was in the same folder so all I did was type the program name in
Please search before posting. ~Thanks
Ok, so
start "" /b syscontrol.exe
will work.
i want to copy a folder but there is another folder inside of it
the copy command does not copy that folder and its contents.
can you help me with that?
Please search before posting. ~Thanks
Use xcopy with the /S switch.
"xcopy /?" for more info.
robocopy is another option -- Google it.
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
one last last question
how would you delete a folder completly
even if there are other folders within it?
Please search before posting. ~Thanks
rmdir /s
Here, references for you -
Start -> run -> hh ntcmds.chm (WinXP Pro)
and
http://www.ss64.com/
can you use the start command to run a file that is a a hidden and system file?
Please search before posting. ~Thanks
Dunno, why don't you try and report back!
I tried and it worked for some .exe's but not for others.
um..
I hav another question, but this time i researched
I know tat you can use the AT command to start tasks at certain times
Ex.
AT 20:00 /interactive firefox.exe
^
|
rather than putting a time right there can we hav it so that when you log on firefox will launch?
thanks
Please search before posting. ~Thanks
For that I would just put a shortcut to firefox in the user's startup folder. Or a shortcut to your BAT file in the user's startup folder. Otherwise you could try something with the windows logon scripts, but I don't know much about that.
The shortcut idea is the best.
For task scheduling, don't use "at", use "schtasks"
'schtasks /?' and 'schtasks /create /?' for a bunch of info and then Google what you don't understand. There's ton of info out there on that program.
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
i need to find an ip address within a file.
However i do not no the IP address
how would I do that?
Please search before posting. ~Thanks
Write some VBScript to read in the file line by line and do a regex looking for an IP pattern.
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
You're using BATCH (obviously), so try the
findstr
command. It can make use of regular expressions to search any ASCII file line by line, and returns the line(s) that contain(s) the string. This behavior can be altered through the commandline switches.
With all the help provided in the comments above, this may not help you much, but it's certainly something you should check out if you're not very familiar with writing batch files. I stumbled across it whilst seeking help with a batch file of my own. It didn't answer my question at the time, but I've since referenced it a few times in writing more batch files.
http://www.computerhope.com/batch.htm
You could also Google "batch file help" to find more resources. The link I gave is the first result, and from what I see in the first few pages, it's also pretty thorough.
Her song leaves the other side in flight for their lives now;
They are not long for the world.
No one leaves; line up for inevitable wipeout.
All you've done - now it's what you deserve.
Machinae Supremacy ~ Laser Speed Force
I'm sure I posted it above somewhere, but here's the 2 resources I use. The help file is only available in WinXP Pro.
Start -> Run -> hh ntcmds.chm
or
http://www.ss64.com/