shutil module (directory input)

K

klia

hello folks

i am trying to tweak the current codes so that later when i call it from the
terminal i can provide sourcefile and the destination file rather being
fixed in the code.becuase now i have to specify the sourcefile and the
destinationfile in codes and not left to be specified from the terminal. i
want to be able to do this.

python shutil_copy.py sourcefile, destinationfile

code
import shutil
shutil.copyfile(srcfile, dstfile) # copy data only
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top