Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Possible Vb Question

Possible Vb Question

Scheduled Pinned Locked Moved Visual Basic
questiontoolshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    droesch
    wrote on last edited by
    #1

    Hi, We are trying to auto compress files through the command prompt. The problem is the file we would like to compress changes every 15 minutes as it is archived using DTS making it hard to code a specific file name, and we dont want to zip them all up incase the zip file becomes corrupt then we loose them all. We purchased WINRAR command prompt, and need to find a way to write a script, or something that will read the contents of a directory, and give us the most current file that was saved. Has anyone done this, and if so is there code that would be usable somewhere..?? Thanks, -David

    R 1 Reply Last reply
    0
    • D droesch

      Hi, We are trying to auto compress files through the command prompt. The problem is the file we would like to compress changes every 15 minutes as it is archived using DTS making it hard to code a specific file name, and we dont want to zip them all up incase the zip file becomes corrupt then we loose them all. We purchased WINRAR command prompt, and need to find a way to write a script, or something that will read the contents of a directory, and give us the most current file that was saved. Has anyone done this, and if so is there code that would be usable somewhere..?? Thanks, -David

      R Offline
      R Offline
      RichardGrimmer
      wrote on last edited by
      #2

      Look up the FileSystemObjct on MSDN, or if you fancy doing it by the seat of your pants so to speak, just set a project reference to WindowsScriptingHost (??? - Dunno). With the reference set, something like set oMyFSO = new WindowsScriptHost.FileSystemObject Should allow you to access all sorts of objects and methods for dealing with the filesystem (F2 = Object browser which will prob help!) "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups