Good afternoon,
In our team we have a number of Stata do files (we are using version 15.1 due to limited funds in our department within a relatively large organisation). We have two sets of network drives one was to store personal files (which was moved to the cloud some time ago) and our shared network drive which we all have access to which was moved to the cloud earlier this week.
I'm not an expert on Sharepoint and it appears that IT probably haven't thought through any issues where people use programmes that contain paths / file locations so they haven't been much help either so far.
On our network drive, we previously 'mapped' our drives and set them up as T:\
We have a lot of do files that are along the lines of:
cd "T:\Datasets\Work area AAA"
use dataset.dta
so this would open T:\Datasets\Work area AAA\dataset.dta
With IT moving all our files from a network drive to Sharepoint, we cannot open do files or stata files directly from Sharepoint (we can see Sharepoint via our Intranet or via an MS Teams channel), IT said that we could go to Sharepoint and create a shortcut to OneDrive. When I do this, we can then copy the full path form Windows Explorer. However, my path is now: "C:\Users\LOGIN_NAME\OneDrive - company name\Department name"
The LOGIN_NAME is unique to me. So if I used that path / file location in the cd statement, my programme would not work for any of my colleagues as their LOGIN_NAME would differ.
I came across the global command which I've not used before.
Could I use the following in any way?
global mainpath "C:\Users\LOGIN_NAME\OneDrive - company name\Department name"
If I did this, could I then use the cd command to set the subfolder, and if so how would I do this.
I tried - cd mainpath&"\Datasets\Work area AAA"
but it didn't like this.
Essentially the "C:\Users\LOGIN_NAME\OneDrive - company name\Department name" would be equivalent to our previously very short "T:"
Regards,
Mandy
In our team we have a number of Stata do files (we are using version 15.1 due to limited funds in our department within a relatively large organisation). We have two sets of network drives one was to store personal files (which was moved to the cloud some time ago) and our shared network drive which we all have access to which was moved to the cloud earlier this week.
I'm not an expert on Sharepoint and it appears that IT probably haven't thought through any issues where people use programmes that contain paths / file locations so they haven't been much help either so far.
On our network drive, we previously 'mapped' our drives and set them up as T:\
We have a lot of do files that are along the lines of:
cd "T:\Datasets\Work area AAA"
use dataset.dta
so this would open T:\Datasets\Work area AAA\dataset.dta
With IT moving all our files from a network drive to Sharepoint, we cannot open do files or stata files directly from Sharepoint (we can see Sharepoint via our Intranet or via an MS Teams channel), IT said that we could go to Sharepoint and create a shortcut to OneDrive. When I do this, we can then copy the full path form Windows Explorer. However, my path is now: "C:\Users\LOGIN_NAME\OneDrive - company name\Department name"
The LOGIN_NAME is unique to me. So if I used that path / file location in the cd statement, my programme would not work for any of my colleagues as their LOGIN_NAME would differ.
I came across the global command which I've not used before.
Could I use the following in any way?
global mainpath "C:\Users\LOGIN_NAME\OneDrive - company name\Department name"
If I did this, could I then use the cd command to set the subfolder, and if so how would I do this.
I tried - cd mainpath&"\Datasets\Work area AAA"
but it didn't like this.
Essentially the "C:\Users\LOGIN_NAME\OneDrive - company name\Department name" would be equivalent to our previously very short "T:"
Regards,
Mandy
Comment