myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Batch file help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> Batch >> Batch file help Page: [1]
Login
Message << Older Topic   Newer Topic >>
Batch file help - 6/9/2008 11:50:38 AM   
mkoerner


Posts: 144
Score: 0
Joined: 7/12/2004
Status: offline
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.
Post #: 1
RE: Batch file help - 6/9/2008 12:20:37 PM   
ndaniels


Posts: 177
Score: 29
Joined: 2/24/2006
From: The Republic of Elbonia
Status: offline
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:".

(in reply to mkoerner)
Post #: 2
Page:   [1]
All Forums >> [Scripting Technologies] >> Batch >> Batch file help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.203