aa2zz6 Posted January 28, 2017 Posted January 28, 2017 (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 January 28, 2017 by aa2zz6
aa2zz6 Posted January 28, 2017 Author Posted January 28, 2017 (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 January 28, 2017 by aa2zz6
jguinch Posted January 28, 2017 Posted January 28, 2017 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" aa2zz6 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
aa2zz6 Posted January 28, 2017 Author Posted January 28, 2017 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
jguinch Posted January 28, 2017 Posted January 28, 2017 See _PathFull is the standard UDF (in the File Management section), it could help you too. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now