Welcome to WinForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

copy to "My documents" from Batchfile

 
   Windows XP Arc2 (Home) -> Help & Support (archive) RSS
Next:  Windows XP Won't Shut Down  
Author Message




User: inactive
Posts:



(Msg. 1) Posted: Mon Jun 05, 2006 4:05 am
Post subject: copy to "My documents" from Batchfile

I am trying to make a program run from a USB pendrive,
and the program must copy a folder to "My Documents" folder.
I would like to create a batch file that will findout if "My Documents" is in the default location or has moved, and then copy the folder.
Is this posible to do from a Batchfile ??

TIA Peter

 >> Stay informed about: copy to "My documents" from Batchfile 
Back to top
Login to vote




User: inactive
Posts:



(Msg. 2) Posted: Mon Jun 05, 2006 6:57 am
Post subject: Re: copy to "My documents" from Batchfile [Login to view extended thread Info.]

pmo wrote:
I am trying to make a program run from a USB pendrive,
and the program must copy a folder to "My Documents" folder.
I would like to create a batch file that will findout if "My Documents" is in the default location or has moved, and then copy the folder.
Is this posible to do from a Batchfile ??

TIA Peter


You can use environmental variables to find out the default locations

Use the cmd program and type SET

you can pipe this to a file by typing set >file.txt
and then the variable names can be used in any batch file
such as

%USERPROFILE%
is the username logged on

Just remember that directories or file names with space in them
require that you enclose them in quotes as dos treats spaces as
delimiters.

so
dir %userprofile%"My documents"

should give you a listing of the files in your my documents folder.
the "'s are required because of the space in my documents.

%homepath% is where your default path is located.

give it a shot.

Rich

 >> Stay informed about: copy to "My documents" from Batchfile 
Back to top
Login to vote
Display posts from previous:   
   Windows XP Arc2 (Home) -> Help & Support (archive) All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows XP
 Windows Vista!
 Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]