Jump to content

Recommended Posts

Posted (edited)

I have a main folder that holds 2 sub directories. The main folder script calls scripts from sub folder. The sub folder with the scripts needs to write a log to the second sub folder that tracks the processes. I don't know how to get out of a sub directory folder and write in another

Global $sLogFile = @ScriptDir & '\Log Directory\Log Sheet.log'

If $CmdLine[0] = 1 Then $sLogFile = $CmdLine[1]

_FileWriteLog($sLogFile, "File Path: " & $FilePath & @CRLF)

 

Edited by aa2zz6
Posted (edited)

I have a main folder that holds 2 sub directories. The main folder script calls scripts from sub folder. The sub folder with the scripts needs to write a log to the second sub folder that tracks the processes. 

 

Edited by aa2zz6
Posted
21 minutes ago, jguinch said:

I don't understand what is your problem.
If you want to access a relative path from your script, you can use this :

$logfile = @ScriptDir & "\..\subfolder2\file.log"

 

Oh I didn't realize "\..\" meant go back 1 directory.

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...