473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Batch file question

Hola, I would like to read a text file containing a version number from within a batchfile and then compare that value with a Version Number in the batchfile.

If the two are different, the rest of the batchfile would run, otherwise it would close.

Hope someone can help

Regards

Avellano
Jun 19 '07 #1
5 1335
bartonc
6,596 Expert 4TB
Hola, I would like to read a text file containing a version number from within a batchfile and then compare that value with a Version Number in the batchfile.

If the two are different, the rest of the batchfile would run, otherwise it would close.

Hope someone can help

Regards

Avellano
Hi Avellano. Batch file, presumably, implies a Windows Forum question.
Jun 19 '07 #2
Hi Avellano. Batch file, presumably, implies a Windows Forum question.
Could well be. If you think I may get an answer from there, please move my question.

Thanks
Jun 19 '07 #3
pbmods
5,821 Expert 4TB
Heya, Avellano.

What language will you be using to parse the batch file?
Jun 19 '07 #4
Heya, Avellano.

What language will you be using to parse the batch file?
Hi,
I have actually solved the problem now.

When the user opens the database, the Splash Screen puts a version file on the users C Drive.
Expand|Select|Wrap|Line Numbers
  1. gstrAction = "Write Version Number to C:\Drive"
  2.         strPath = "C:\MADRE\Shortcuts\" & DBCode & VersionNumber & ".txt"
  3.         Kill strPath
  4.         Open strPath For Output As #1
  5.         Print #1, VersionNumber
  6.         Close #1
When I post a new version to the network, I change the version number in the database and in the batch file.

Here is the complete batchfile:
Expand|Select|Wrap|Line Numbers
  1. IF EXIST C:\Madre\Shortcuts\PagaYa1.0n.txt. (OPENAPP) ELSE GOTO DOWNLOAD
  2.  
  3. :OPENAPP
  4. C:\MADRE\Shortcuts\PagaYaStart.lnk
  5. GOTO END
  6.  
  7. :DOWNLOAD
  8. MD C:\MADRE
  9. MD C:\MADRE\Database
  10. MD C:\MADRE\Documents
  11. MD C:\MADRE\Shortcuts
  12.  
  13. COPY "M:\General\Database\DownLoads\MouseHook.dll" C:\MADRE\Database
  14.  
  15. COPY "M:\General\Database\Downloads\PagaYaUman.doc" C:\MADRE\Documents
  16.  
  17. COPY "M:\General\Database\Shortcuts\PagaYaStart.lnk" "C:\Madre\Shortcuts"
  18.  
  19. COPY "M:\General\Database\Shortcuts\PagaYa.lnk" "C:\Documents and settings\all users\desktop"
  20.  
  21. COPY "M:\General\Database\PagaYaApp.mdb" C:\MADRE\Database
  22.  
  23. C:\MADRE\Shortcuts\PagaYaStart.lnk
  24.  
  25. :END
  26. cls
Regards

Avellano
Jun 20 '07 #5
pbmods
5,821 Expert 4TB
Heya, Avellano.

I have actually solved the problem now.
Excellent!

When the user opens the database, the Splash Screen puts a version file on the users C
Good idea. Thanks for posting your solution. If you hit any bumps in the future, post back anytime :)
Jun 20 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: carrot | last post by:
With .Net Studio, I have a solution includes some projects. I want to execute a batch file during build solution time. For example, 1'st project is builded. 2'nd project is builded. " a batch...
3
by: KRK | last post by:
I am having one batch file and using this I can start my Server. It will execute all exes while starting. Now my question is how to debug my exe using this batch file?? Is it possible to execute this...
2
by: Stephen | last post by:
Hi all, I want to create an app that runs a batch file which inturn runs applications. question: if I start the batch file from app1, how can app1 know that the batch file ran successfully...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
4
by: | last post by:
Hello, I am attempting to convert multiple .wav files to the .flac format via a batch script. I know that this can be done with numerous software implementations automatically for me; however, i am...
4
ck9663
by: ck9663 | last post by:
hi guys this is a little challenging, at least for me...here goes... i have to run a DOS batch file from a server. with some parameters that i need to pass. these parameters can be found on a...
1
benchpolo
by: benchpolo | last post by:
I'm not sure if this is the right section to post my question regarding FTP Batch scripting. Question? I have multiple textfiles where the filename is dynamically changing daily. For example, ...
0
by: gabrielk43 | last post by:
Hi to all, I have made a web service which creates a batch file in a folder in web server and tries to execute it (in a Windows Server 2003 web server). So far I have managed to create the batch...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
1
by: raviva | last post by:
Hi, I have a question regarding the batch file. When that batch file is run, its ftps a csv file from windows to oracle end(ours is on unix platform). This is quite simple right?? But there are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.