473,320 Members | 2,088 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,320 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 1331
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.