Browsing this Thread: 1 Anonymous Users
Re: Icaros Desktop 2.2 with Final Writer is here!
yes I read up on the syntax of SET idsrc=%~dp0
but after I posted the first post, I guess I was to lazy at first.
Anyway for some reason but I do not think it is the SET idsrc=%~dp0 fault, but the use of CD in script and then .\folders\files reference to copy files. to destination
on my machine it began to copy files from system32 folders an I do belive that the reference to current dir somehow is set to where this commands is located, and therefore by referencing .\folder\files it will copy it from that location. And this turned out to be double true when you used CD inside the script but still not copied the files from that directory (and again on my machine) with no Admin rights.
However by hardcoding the sourcedir to copy from the SET idsrc=J: like I did (where the script is started from), it did copy the files from the CD, the only reason I harcoded the actual (or virtual) CD was that I was launching the script from desktop as I "made it work" for me. So therefore I used J:. The correct way when launched from CD is your way.
Future reference "copy from" I suggest should be %idsrc% though
The & sign somewhere in the code is a "leftover" I forgot to remove, I commented the lines to figure out where things went wrong, like this
SET idsrc=%~dp0&:: Sorry can't use this as reference.
Why? well some of the variables when using this commenting did add a large space at the end so that SET avar=J:\path\to\a folder\ &:: or :: added a long string of space at the end upto the comment.
so when using copy %avar%somefile became "J:\path\to\a folder\.....somefile" (where the dots are spaces) which obviously could not be found, it was a leftover and an error introduced bymyself in my testing.
To the reason to why some backslashes are gone I think we could blame aros-exec CODE block it does not take a single backslash for some reason ? Cpp thing?
That was the reason to why I added the external link to the same code, unfortunatly spelled in Swedish as I was braindead. But it is there.
To make this long story short
make all paths be dependent to a variable constant path like %idsrc%, not a hardcoded relative path like .\Arch
Look up for the quote marks as they tend to be doubled at some points.
//I hope this make more sense now
//A bit later
to the copying of the home.info icon, I copied to default Sys: installation dir which in turn when opening it from inside AROS opens the HOME: drawer
wich is in Windows dokuments as you said, to me it makes more sense to be able to open that folder from inside Aros desktop from that Icon, I could be wrong, but it works. And that is all that matters I think!
Posted on: 1/7 9:46
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.