Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing long Directory Command in DOS
Message
From
16/12/2013 15:52:27
 
 
To
15/12/2013 03:07:42
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01590257
Message ID:
01590412
Views:
49
Perhaps the problem isn't specifically the long filename per se, but problems in parameter parsing arising from having embedded spaces in the file and folder names?

The example given:
gswin32c.exe -sDEVICE="pdfwrite" -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -dSAFER -dQUIET -sOUTPUTFILE=D:\COMP JAIPUR\20131106_20131101\100042\1001817119.Pdf D:\COMP JAIPUR\20131106_20131101\100042\1001817119.ps
is likely to get parsed as:

0: gswin32c.exe
1: -sDEVICE="pdfwrite"
2: -sPAPERSIZE=a4
3: -dNOPAUSE
4: -dBATCH
5: -dSAFER
6:-dQUIET
7: -sOUTPUTFILE=D:\COMP
8: JAIPUR\20131106_20131101\100042\1001817119.Pdf
9: D:\COMP
10: JAIPUR\20131106_20131101\100042\1001817119.ps

note how the option for output file as well as input file end up broken into pieces because of the spaces.

You can quotes around the parameters to aid in proper parsing of the parameters:

So in given the example you gave:

gswin32c.exe -sDEVICE="pdfwrite" -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -dSAFER -dQUIET "-sOUTPUTFILE=D:\COMP JAIPUR\20131106_20131101\100042\1001817119.Pdf" "D:\COMP JAIPUR\20131106_20131101\100042\1001817119.ps"

which should get parsed as:

0: gswin32c.exe
1: -sDEVICE="pdfwrite"
2: -sPAPERSIZE=a4
3: -dNOPAUSE
4: -dBATCH
5: -dSAFER
6: -dQUIET
7: -sOUTPUTFILE=D:\COMP JAIPUR\20131106_20131101\100042\1001817119.Pdf
8: D:\COMP JAIPUR\20131106_20131101\100042\1001817119.ps


>Using VFP I have created a Batch File that at the end exeucutes an application in command prompt.(dos prompt)
>
>The command inside is
>
>gswin32c.exe -sDEVICE="pdfwrite" -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -dSAFER -dQUIET -sOUTPUTFILE=D:\COMP JAIPUR\20131106_20131101\100042\1001817119.Pdf D:\COMP JAIPUR\20131106_20131101\100042\1001817119.ps
>
>My problem is that the input and output path being Long folder names as (perhaps more than 8 character) the process dont work.When I change the folder name to small one it works fine.
>
>But manually it is not possible to change name of thousnds of such folder.
>
>What is to be done. Any alternative ?
>
>Also one more related issue. The above conversion process is taking huge time , I am working on 32 Bit windows XP. Will my Migration to 64 Bit Win-7 and 8 will enhance my above speed of conversion. If yes, than how much time(if any Idea)
>
>Kinldy Guide
>Regards
Previous
Reply
Map
View

Click here to load this message in the networking platform