DosTips.com

A Forum all about DOS Batch
It is currently 26 May 2017 18:38

All times are UTC-06:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 09 Jan 2017 07:28 
Offline

Joined: 09 Jan 2017 07:20
Posts: 2
I have created a batch file linked to a pdf file. The aim is that when you click the link on the pdf it will open the batch file which in turn will open a 360 image software which will then open the image itself.
If i write the batch file like this

"path to software" "path to image"

it works perfectly.
However I do not have a fixed "path to image". rather I have a folder structure like this.
Main folder>pdf and two other folders, one named executables and one named images, with the batch file located in the executables folder and the images to be open in the images folder.

So I have written the batch file as follows:

"path to software" "..\images\imagenumber.jpeg"

Here the software opens but the image does not and I cant figure out why. If i make a batch file as such

"..\images\imagenumber.jpeg"

It can open the image alone, but for some reason coupling this with viewing software just seems to stop it at its tracks.

Any theories?


Top
   
PostPosted: 09 Jan 2017 08:34 
Offline

Joined: 20 Jan 2016 15:46
Posts: 20
When your batch is launched from another process (the PDF software in this case), the active directory it runs from will be whichever one the launching process was using. You will either need to use an absolute path to your image, or have the batch explicitly change to a known directory.


Top
   
PostPosted: 09 Jan 2017 09:38 
Offline

Joined: 09 Jan 2017 07:20
Posts: 2
kwsiebert wrote:
When your batch is launched from another process (the PDF software in this case), the active directory it runs from will be whichever one the launching process was using. You will either need to use an absolute path to your image, or have the batch explicitly change to a known directory.


In that case how can I launch a batch file as follows

"..\images\R0010337.jpg"

from the pdf and it will open the image from the correct directory.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited