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 January 29th, 2008, 08:55 AM
dutch_boi1 dutch_boi1 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 3 dutch_boi1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 52 m 48 sec
Reputation Power: 0
Exclamation NT Batch - Reading from TXT/TMP and using as an input string

Hi,

im new to the forums so sorry if this is the wrong spot but yeah. ok straight to business i have made a backup script which will backup my folders and files using robocopy (windows vista home premium) to another hard drive. some people have been asking me to make the script for them but it is a pain having to edit the script everytime to include their info.

so i decided to make a setup.bat file which when launched asks them where the source directories they want are and where they want the files copied. when the user enters the information it is copied to a file int he same directory as the.bat called SD1.TMP, or sourcedirectory1.tmp.

I have no idea of how i would get my backup script to read the.tmp files which contain basic text, such as C:\Users\owner\Documents and input it to the corresponding area on my script.

If you need to i can upload my scripts so u can have another look. Although i doubt i can do what ive described it would be nice .

Cheers

Reply With Quote
  Trader Rating: 1 · #2  
Old January 29th, 2008, 01:22 PM
weevilofdoom's Avatar
weevilofdoom weevilofdoom is offline
BLURG
Dev Hardware Loyal (3000 - 3499 posts)
 
Join Date: Sep 2004
Location: Oregon
Posts: 3,420 weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)  Folding Points: 32443 Folding Title: Starter FolderFolding Points: 32443 Folding Title: Starter Folder
Time spent in forums: 2 Months 23 h 55 m 21 sec
Reputation Power: 3411
Send a message via ICQ to weevilofdoom Send a message via AIM to weevilofdoom Send a message via MSN to weevilofdoom Send a message via Yahoo to weevilofdoom Send a message via Google Talk to weevilofdoom
FOR /F %%i IN (c:\test.txt) DO @echo %%i

this will read the file and echo it. Modify to your needs of course.
__________________

Reply With Quote
  Trader Rating: 0 · #3  
Old January 29th, 2008, 07:31 PM
dutch_boi1 dutch_boi1 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 3 dutch_boi1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 52 m 48 sec
Reputation Power: 0
Wow that was so simple i cant believe i didnt think of that before hand.
Does anyone want to test my script ?
if so ill upload it and u's could gimme some tips haha.

thanks alot weevilofdoom

Reply With Quote
  Trader Rating: 1 · #4  
Old January 31st, 2008, 05:44 PM
weevilofdoom's Avatar
weevilofdoom weevilofdoom is offline
BLURG
Dev Hardware Loyal (3000 - 3499 posts)
 
Join Date: Sep 2004
Location: Oregon
Posts: 3,420 weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 37th Grade (Above 100000 Reputation Level)  Folding Points: 32443 Folding Title: Starter FolderFolding Points: 32443 Folding Title: Starter Folder
Time spent in forums: 2 Months 23 h 55 m 21 sec
Reputation Power: 3411
Send a message via ICQ to weevilofdoom Send a message via AIM to weevilofdoom Send a message via MSN to weevilofdoom Send a message via Yahoo to weevilofdoom Send a message via Google Talk to weevilofdoom
no problem, glad i could help

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > NT Batch - Reading from TXT/TMP and using as an input string


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