Batch file help (Full Version)

All Forums >> [Scripting Technologies] >> Batch



Message


mkoerner -> Batch file help (6/9/2008 11:50:38 AM)

I need to delete a dir \\server\E:\Program Files\ XXXX\WebsiteOld\

Where XXXX is a website name. I know there is a way you have a batch read from a txt file but I forgot the commmand. Can someone help me out.




ndaniels -> RE: Batch file help (6/9/2008 12:20:37 PM)

quote:

I know there is a way you have a batch read from a txt file but I forgot the commmand.


You're probably looking for the "FOR" command with "/F".  Take a look at the help ("FOR /?") and see if that's what you need.  Example:

for /f "tokens=1" %%a in (list.txt) do echo %%a


Also, remember that administrative shares end with $, therefore it would probably be "e$", not "e:".




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.171875