Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

VBScript + get current directory


  • Please log in to reply

#1
codecraig

codecraig

    Member

  • Member
  • PipPip
  • 61 posts
how can i use vbscript to get the current directory? so if i run test.vbs in C:\data

I want to figure out that I am running in C:\data from test.vbs.

any ideas?

thanks
  • 0

Advertisements


#2
codecraig

codecraig

    Member

  • Topic Starter
  • Member
  • PipPip
  • 61 posts
any ideas?
  • 0

#3
skate_punk_21

skate_punk_21

    Malware Removal Expert

  • Retired Staff
  • 1,049 posts
not so sure about scripting, but for VB6 you've got "CurDir" which returns current working directory. soooo yea....maybe?? lol

Edited by skate_punk_21, 17 August 2005 - 04:24 PM.

  • 0

#4
satih

satih

    New Member

  • Member
  • Pip
  • 2 posts
http://leereid.wordp...tory-or-folder/

man, google for: current directory vbscript
it's basic

if this blog will get deleted, what "leereid" wrote is:

currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))
WScript.Echo currentDirectory

:)
  • 0

#5
Rosh

Rosh

    New Member

  • Member
  • Pip
  • 1 posts
Hi,
Do this:

Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")


Gimme a treat for this..

~Rosh
  • 0

#6
satih

satih

    New Member

  • Member
  • Pip
  • 2 posts
Nice one, thanks :)
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP