Directing output from command to folder
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am using pdfdetach utility which would extract embedded objects in PDF files and dump them to the current folder. Output can be anything such as .doc files or others. All I want to do is that whatever the output of the pdfdetach, I want it to be stored in sub-directory instead of current directory by default.
Here is the simple line I am trying but is not working:
pdfdetach -saveall JSPopupCalendar.pdf > /subfolder/
bash shell-script pdf
add a comment |Â
up vote
0
down vote
favorite
I am using pdfdetach utility which would extract embedded objects in PDF files and dump them to the current folder. Output can be anything such as .doc files or others. All I want to do is that whatever the output of the pdfdetach, I want it to be stored in sub-directory instead of current directory by default.
Here is the simple line I am trying but is not working:
pdfdetach -saveall JSPopupCalendar.pdf > /subfolder/
bash shell-script pdf
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using pdfdetach utility which would extract embedded objects in PDF files and dump them to the current folder. Output can be anything such as .doc files or others. All I want to do is that whatever the output of the pdfdetach, I want it to be stored in sub-directory instead of current directory by default.
Here is the simple line I am trying but is not working:
pdfdetach -saveall JSPopupCalendar.pdf > /subfolder/
bash shell-script pdf
I am using pdfdetach utility which would extract embedded objects in PDF files and dump them to the current folder. Output can be anything such as .doc files or others. All I want to do is that whatever the output of the pdfdetach, I want it to be stored in sub-directory instead of current directory by default.
Here is the simple line I am trying but is not working:
pdfdetach -saveall JSPopupCalendar.pdf > /subfolder/
bash shell-script pdf
bash shell-script pdf
edited Sep 7 at 21:40
Rui F Ribeiro
36.8k1273117
36.8k1273117
asked Sep 7 at 21:32
ksa_coder
1084
1084
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Use the "-o" argument. e.g. pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
See man page http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall
Save all of the embedded files. This uses the file names associated with the
embedded files (as printed by the "-list" switch). By default, the files are saved
in the current directory; this can be changed with the "-o" switch.
-o path
Set the file name used when saving an embedded file with the "-save"
switch, or the
directory used by "-saveall".
Example, showing how we detach the KSBASE.WQ2 file from inside fileAttachment.pdf.
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
Please update your question to include (1) initial output offind . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output ofpdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Use the "-o" argument. e.g. pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
See man page http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall
Save all of the embedded files. This uses the file names associated with the
embedded files (as printed by the "-list" switch). By default, the files are saved
in the current directory; this can be changed with the "-o" switch.
-o path
Set the file name used when saving an embedded file with the "-save"
switch, or the
directory used by "-saveall".
Example, showing how we detach the KSBASE.WQ2 file from inside fileAttachment.pdf.
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
Please update your question to include (1) initial output offind . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output ofpdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
add a comment |Â
up vote
2
down vote
accepted
Use the "-o" argument. e.g. pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
See man page http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall
Save all of the embedded files. This uses the file names associated with the
embedded files (as printed by the "-list" switch). By default, the files are saved
in the current directory; this can be changed with the "-o" switch.
-o path
Set the file name used when saving an embedded file with the "-save"
switch, or the
directory used by "-saveall".
Example, showing how we detach the KSBASE.WQ2 file from inside fileAttachment.pdf.
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
Please update your question to include (1) initial output offind . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output ofpdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Use the "-o" argument. e.g. pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
See man page http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall
Save all of the embedded files. This uses the file names associated with the
embedded files (as printed by the "-list" switch). By default, the files are saved
in the current directory; this can be changed with the "-o" switch.
-o path
Set the file name used when saving an embedded file with the "-save"
switch, or the
directory used by "-saveall".
Example, showing how we detach the KSBASE.WQ2 file from inside fileAttachment.pdf.
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
Use the "-o" argument. e.g. pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
See man page http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall
Save all of the embedded files. This uses the file names associated with the
embedded files (as printed by the "-list" switch). By default, the files are saved
in the current directory; this can be changed with the "-o" switch.
-o path
Set the file name used when saving an embedded file with the "-save"
switch, or the
directory used by "-saveall".
Example, showing how we detach the KSBASE.WQ2 file from inside fileAttachment.pdf.
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
edited Sep 7 at 22:19
DopeGhoti
41.2k55180
41.2k55180
answered Sep 7 at 21:39
steve
13k22249
13k22249
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
Please update your question to include (1) initial output offind . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output ofpdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
add a comment |Â
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
Please update your question to include (1) initial output offind . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output ofpdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
Hi Steve. i tried this prior to posting and for reassurance, I tried it again now. I keep getting this error in terminal: I/O Error: Error saving embedded file as ''
â ksa_coder
Sep 8 at 21:34
1
1
Please update your question to include (1) initial output of
find . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output of pdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
Please update your question to include (1) initial output of
find . -ls
, (2) exact pdfdetach command and subsequent output seen when fails, and (3) output of pdfdetach -list JSPopupCalendar.pdf
â steve
Sep 8 at 21:39
1
1
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
Brilliant! To do as requested, I deleted the output that was generated previously by the command. Then when I tried the command again, it worked. So apparently you get that error message when a file with the same name in the directory exist. Thanks Steve
â ksa_coder
Sep 8 at 21:44
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f467626%2fdirecting-output-from-command-to-folder%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password