Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am aware that i can use "..\" to call the folder before it. But is there a way such that i do not have to write out so many relative paths and end up writing something like "..\..\..\..\..\"
I know there is a way to do this. But i can't seem to find it. I hope somebody can answer my question.
I just need to access the various folders from the directory. I would prefer to assign it to each variable to make other coders have an easier time understanding my work.
DIRECTORY C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Data\Programs;
LET vErrorProgramPath = 'C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Data\Programs\Error';
LET vStoreProgramQVD = 'C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Data\Programs\QVD\';
LET vStoreProgramBackup ='C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Data\Programs\Backup';
LET vRootFolderPath = 'C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Data\Programs\All Programs';
LET vFileExtension ='*xls';
This is precisely the way most experienced developers manage the paths. Assign the paths to variables using LET or SET and then reference the variable in the LOAD statement.
LOAD *
FROM [$(vRootFolderPath)]\mydata.xls
This is precisely the way most experienced developers manage the paths. Assign the paths to variables using LET or SET and then reference the variable in the LOAD statement.
LOAD *
FROM [$(vRootFolderPath)]\mydata.xls
Thanks Rob, Basically assigning the root folder to a variable made things cleaner and it works perfectly.
So now i wrote it as this.
LET vRootMasterPath ='C:\Users\muzamirnasir\Desktop\Mini Project\Prototype1\Resident Survey\Data\Master';
LET vErrorMasterPath ='$(vRootMasterPath)\Error';
LET vStoreMasterQVD ='$(vRootMasterPath)\QVD\';