Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-18-2019, 12:55 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
Script name and path

Is there a property to pull the running VBscript's path and file name? I need to be able to make an on the fly edit to a portion of the script for the next time it is run and don't wan't to have to force users the have the script file in a defined location to run it or create separate files.
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #2  
Old 01-18-2019, 01:01 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
I want to parse the script for a line with a comment like
Code:
'script pointer 1
Then Replace the line following it with a new one.
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #3  
Old 01-18-2019, 01:09 PM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 319
Hi bstedh,

You can get the full path to the running script using the crt.ScriptFullName property.

Attached Images
File Type: png SCR_Help_ScriptAPI_ScriptFullName.png (90.1 KB, 324 views)
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #4  
Old 01-18-2019, 02:05 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
Thanks, didn't even think to try that as an CRT object. I kept trying it as a file system object and could only get the path and not the file name.
__________________
Version 6.7.3 (build 292)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:57 AM.