I created a shortcut to open my Dropbox in File Explorer and I would like to run the script on 2 different computers.
Problem: the Adminstrator name is not the same on both devices...
PC 1: Run "C:\Users\Admin\Dropbox\"
PC 2: Run "C:\Users\NickNameX\Dropbox\"
For now I've created 2 different scripts - one for each device - that I try to keep in sync. But since there are many more shortcuts & shortstrings (the Dropbox one is just an example) this is a bit tedious.
Is there any workaround for this?
Like some kind of "joker" that I could write in the path and magically get the right result depending on the system? (like "C:\Users\%%%\Dropbox" or something?)
Needless to say I am a newbee, so please do explain all my obvious mistakes and illusions.... :d
(One thing I know that won't work though is changing the Administrator name - Windows will change it on "display" but the actual file paths will remain unchanged.
Apparently with Window you only get 1 chance to set your Administrator name right.)
Thanks in advance for any help or suggestion!
Syncing: refer to 2 different file locations with 1 script?
Re: Syncing: refer to 2 different file locations with 1 script?
Code: Select all
Run, % dropboxDir()
dropboxDir() {
FileRead, ttext, % StrReplace(A_AppData, "Roaming", "Local\Dropbox\info.json")
RegExMatch(ttext, """path"": ""(.+?)""", dir)
Return StrReplace(dir1, "\\", "\")
}
Who is online
Users browsing this forum: Kodakku and 367 guests