Copying file to local drive via PStart interface

Ask other users about problems encountered with portable apps or help by posting solutions to existing problems.
Post Reply
Message
Author
arlanda
Posts: 3
Joined: Tue Apr 01, 2008 4:04 pm

Copying file to local drive via PStart interface

#1 Post by arlanda »

Hello,

Is it possible to copy a file from the USB drive to local computer via the PStart interface? If yes, how can I do this?

arlanda

User avatar
vikingdread
Posts: 10
Joined: Thu Nov 29, 2007 2:51 am
Contact:

Re: Copying file to local drive via PStart interface

#2 Post by vikingdread »

arlanda wrote:Hello,

Is it possible to copy a file from the USB drive to local computer via the PStart interface? If yes, how can I do this?

arlanda
The first thought that crossed my mind was "why would you need something like that?"

But I suppose you could do it as follows if you always want to copy the same file:

create a shortcut to a batch-file (*.bat) in PStart and have the batch-file do a copy of the required file.

arlanda
Posts: 3
Joined: Tue Apr 01, 2008 4:04 pm

#3 Post by arlanda »

Hi, the batch method will not work because I need to hardcode the removable drive letter. I am unable to use PStart's variable %pdrive% because it is external to the BAT file (unless linking is allowed?). Will using PStart's "Command line parameter (optional)" in File properties dialog help in this case?

If all else fail, I'll simply add a script that will ask me to manually input the external's drive letter before it can copy the file over.

User avatar
vikingdread
Posts: 10
Joined: Thu Nov 29, 2007 2:51 am
Contact:

#4 Post by vikingdread »

arlanda wrote:Hi, the batch method will not work because I need to hardcode the removable drive letter. I am unable to use PStart's variable %pdrive% because it is external to the BAT file (unless linking is allowed?). Will using PStart's "Command line parameter (optional)" in File properties dialog help in this case?

If all else fail, I'll simply add a script that will ask me to manually input the external's drive letter before it can copy the file over.
You use the %pdrive% variable as a command line parameter to the batch file.

In the batch file you use the value of %pdrive% by substituting it with the number that corresponds with the order in which %pdrive% appears in the command line parameter list.

If %pdrive% is the first (or only) command line parameter, then you use %1 in the batch file. If %pdrive% is the third command line parameter, then you use %3 in the batch file.


For example:

Code: Select all

copy %1\myfile.doc c:\temp\myfile.doc
pause
above code would copy a file called "myfile.doc" from your USB stick to your c: drive

It can be done...

arlanda
Posts: 3
Joined: Tue Apr 01, 2008 4:04 pm

#5 Post by arlanda »

Awesome! Your solution worked perfectly for me so thank you very much! :D

Post Reply