Results 1 to 6 of 6

Thread: Script to compare number in text files?

  1. #1
    Account closed at user request
    Join Date
    Aug 2003
    Location
    Elephant watch camp
    Posts
    2,150
    Thanks
    56
    Thanked
    115 times in 103 posts
    • wasabi's system
      • Motherboard:
      • MSI B85M-G43
      • CPU:
      • i3-4130
      • Memory:
      • 8 gig DDR3 Crucial Rendition 1333 - cheap!
      • Storage:
      • 128 gig Agility 3, 240GB Corsair Force 3
      • Graphics card(s):
      • Zotac GTX 750Ti
      • PSU:
      • Silver Power SP-S460FL
      • Case:
      • Lian Li T60 testbanch
      • Operating System:
      • Win7 64bit
      • Monitor(s):
      • First F301GD Live
      • Internet:
      • Virgin cable 100 meg

    Script to compare number in text files?

    Need to create a logon script which will pull down some files from the server but dont' want it to happen every time.

    Ideally I'd like the logon script to look inside a txt or ini file on the local machine and see a number, then look at a txt or ini file on server, and cmpare values. If the number on server copy of file is bigger, do a then copy files type thing.

    So if client ini file has number 3 in it, and server ini file has 4 in it, then file will be copied down.

    Ideally something as a batch file or vbsript would be best.

    Anyone know how to do this? I normally only write batch files and don't know any commandts to compare values in files.

  2. #2
    Senior Member
    Join Date
    Jan 2005
    Location
    Manchester
    Posts
    2,900
    Thanks
    67
    Thanked
    182 times in 136 posts
    • Butcher's system
      • Motherboard:
      • MSI Z97 Gaming 3
      • CPU:
      • i7-4790K
      • Memory:
      • 8 GB Corsair 1866 MHz
      • Storage:
      • 120GB SSD, 240GB SSD, 2TB HDD
      • Graphics card(s):
      • MSI GTX 970
      • PSU:
      • Antec 650W
      • Case:
      • Big Black Cube!
      • Operating System:
      • Windows 7
    Bit beyond the scope of batch files, you're going to want a scripting language or programming language for this.

  3. #3
    daft ideas inc. scottyman's Avatar
    Join Date
    Jul 2003
    Location
    Charming and Exotic Bracknell
    Posts
    1,576
    Thanks
    2
    Thanked
    3 times in 3 posts
    you'd have to use a scripting langauge and javascript.
    cookies would be better, then you can use your own flavour of scripting language. in fact - if you do use cookies, then load cookies into session variables, update then re-write the cookie. much less work, and fewer issues with the browser sandbox.

  4. #4
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    have a check up on how to use the FileScriptingObject from VBS. That'll be the kiddy you want. 10 lines of code maximum - i just can't remember the proper syntax off hand

  5. #5
    Account closed at user request
    Join Date
    Aug 2003
    Location
    Elephant watch camp
    Posts
    2,150
    Thanks
    56
    Thanked
    115 times in 103 posts
    • wasabi's system
      • Motherboard:
      • MSI B85M-G43
      • CPU:
      • i3-4130
      • Memory:
      • 8 gig DDR3 Crucial Rendition 1333 - cheap!
      • Storage:
      • 128 gig Agility 3, 240GB Corsair Force 3
      • Graphics card(s):
      • Zotac GTX 750Ti
      • PSU:
      • Silver Power SP-S460FL
      • Case:
      • Lian Li T60 testbanch
      • Operating System:
      • Win7 64bit
      • Monitor(s):
      • First F301GD Live
      • Internet:
      • Virgin cable 100 meg
    Thanks guys. Cookies could be problematic given the file comparison is on a per machine basis rather than per user. Will check out filescripting object, though given lack of quick-fix might dig out my old perl book and try there too.

  6. #6
    Senior Member
    Join Date
    Jan 2005
    Location
    Manchester
    Posts
    2,900
    Thanks
    67
    Thanked
    182 times in 136 posts
    • Butcher's system
      • Motherboard:
      • MSI Z97 Gaming 3
      • CPU:
      • i7-4790K
      • Memory:
      • 8 GB Corsair 1866 MHz
      • Storage:
      • 120GB SSD, 240GB SSD, 2TB HDD
      • Graphics card(s):
      • MSI GTX 970
      • PSU:
      • Antec 650W
      • Case:
      • Big Black Cube!
      • Operating System:
      • Windows 7
    perl is ideally suited to that sort of thing, I'd get that book out.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Nero vision express saying:'Burn process failed'
    By johnnr892 in forum Help! Quick Relief From Tech Headaches
    Replies: 15
    Last Post: 11-12-2005, 11:43 PM
  2. Nero or Burner ?
    By Foxile in forum Help! Quick Relief From Tech Headaches
    Replies: 30
    Last Post: 04-04-2005, 07:31 AM
  3. Catalyst 5.3 Available Now
    By Steve in forum Graphics Cards
    Replies: 16
    Last Post: 15-03-2005, 12:46 PM
  4. Passing variables, writing text files, etc
    By daverobev in forum Software
    Replies: 17
    Last Post: 03-12-2003, 03:49 PM
  5. Replies: 7
    Last Post: 01-11-2003, 11:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •