First of all i'm sorry for my English.
Hi, I have been using this fantastic program from many years on windows pc.
Now on mac I've problems with path in batch file.
I've created a batch that has a letf pair path relative to directory where I saved the batch.
<Left>../..</Left>
<Right>sftp://xx.xxx.xxx.xxx/web/test3|keyfile=******.ppk</Right>
In windows pc the start path is the directory where I run the batch and this it's ok,
while if i run this batch on mac the start path is the directory where is placed the freefilesync application and this it's bad for me.
Is it possible, on mac, to set the starting path on the directory where i run the batch?
Working directory when starting batch file (macOS)
- Posts: 2
- Joined: 26 Mar 2020
- Site Admin
- Posts: 7212
- Joined: 9 Dec 2007
FFS considers paths like . and .. as relative to the working directory. On Windows, double-clicking a file sets the working directory to the file's parent folder. macOS apparently sets it to the application's parent folder instead. I'm not sure if FFS should do something about the latter case.
- Posts: 2
- Joined: 26 Mar 2020
In fact it's so.
However, I solved it by creating a php script that reads the ffs_batch file, takes the path of the file and joins it to the reltive path present in <Left>../.. </Left>.
In practice, the php script converts the relative path into an absolute path and saves it in a temporary ffs_batch file that it executes with "start tmp.ffs_batch" on windows and with "open tmp.ffs_batch on mac"
Thanks for the reply.
However, I solved it by creating a php script that reads the ffs_batch file, takes the path of the file and joins it to the reltive path present in <Left>../.. </Left>.
In practice, the php script converts the relative path into an absolute path and saves it in a temporary ffs_batch file that it executes with "start tmp.ffs_batch" on windows and with "open tmp.ffs_batch on mac"
Thanks for the reply.