Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old February 20th, 2008, 03:24 AM
Yoke Yoke is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 Yoke User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 34 sec
Reputation Power: 0
DOS Batch - File extenstion removal in loop

I'm Really new to creating these batch files. I think this is the second one I've made.

I need to find a way to remove the file extenstion from the %%I variable or set it to a normal %i% type variable so that the zip file does not say *.txt.zip

@Echo off
cd\
cd\test
dir *.txt /B>tmp
FOR /F %I% IN (tmp) DO (
Echo %%I
7za a %%I.zip %%I.txt
pause
del %%I.txt
)
del tmp
pause
exit


Also if it helps I am creating this batch on Windows XP but I need to run it on a Windows 98 machine.

Thank you for any help!

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > DOS Batch - File extenstion removal in loop


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway