Current location: Hot Scripts Forums » Programming Languages » Perl » Copy from the curent directory to...


Copy from the curent directory to...

Reply
  #1 (permalink)  
Old 12-29-03, 04:38 PM
freak freak is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Question Copy from the curent directory to...

I'm kind of conused, or maybe i just don't use the correct commands, but i cant make a script that will copy a spesific file let's say blabla.jpg from the current folder, to a specific folder - let's say c:\games

Can somebody PLEASE give me the script that will do it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-29-03, 05:09 PM
YUPAPA's Avatar
YUPAPA YUPAPA is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Antarctica
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Quote:
Originally Posted by freak
I'm kind of conused, or maybe i just don't use the correct commands, but i cant make a script that will copy a spesific file let's say blabla.jpg from the current folder, to a specific folder - let's say c:\games

Can somebody PLEASE give me the script that will do it
You can use the command interface DOS (looks like windozs you are using)~

copy C:\my\source\location\blabla.jpg C:\my\destination\blabla.jpg

If you need a script, you must have perl installed on your system~ Without perl installed, even I give you the script, it will not run.
__________________
YuPaPa.CoM is my home ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-30-03, 10:25 AM
freak freak is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Question

can someone just unser my question, please ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 12-30-03, 10:52 AM
YUPAPA's Avatar
YUPAPA YUPAPA is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Antarctica
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

I didn't?
__________________
YuPaPa.CoM is my home ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 12-30-03, 10:58 AM
freak freak is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
ABSOLUTLY NOT !!!! i asked a PERL SCRIPT not dos commands ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 12-30-03, 11:07 AM
YUPAPA's Avatar
YUPAPA YUPAPA is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Antarctica
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Code:
#!/usr/bin/perl
use File::Copy;

my $src = 'C:\my\src\file';
my $des = 'C:\my\des\file';

copy($src,$des);
__________________
YuPaPa.CoM is my home ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 12-30-03, 02:12 PM
freak freak is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
now THAT'S a GOOD anwer.
But all my problem in this is-
i want to copy blabla.gpj fron the 'curent directory'[so that the program will "understand" by itself what directory is it in and put it in the '$src' (in condition that that perl script[let's say program.pl] and blabla.gpj are in the same directory)] ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 05:28 PM
Zip a contents of a directory makro77 Perl 1 11-06-03 01:28 PM
? on users accessing a directory mdhall PHP 10 10-18-03 01:25 PM
Upload to user-defined directory? tom PHP 1 09-26-03 12:14 PM
Showing images in a directory Bob PHP 4 08-25-03 09:16 AM


All times are GMT -5. The time now is 10:06 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.