Jan 24, 2012 04:53 PM
(This post was last modified: Jan 24, 2012 04:54 PM by Needlz.)
Hi, I am currently learning python 3 and needed to learn how to move a file for a script I am currently making.
I have commented so you know what is going on. I am using the shutil module and getting user input.
This is written for py3
I have commented so you know what is going on. I am using the shutil module and getting user input.
This is written for py3
Quote:#Importing the shutil module
import shutil
#Asking user input for the source file
source = input("Please enter your source file > ")
#Asking user input for destination
destination = input("Now please enter your destination file > ")
#Moving the source to destination =
shutil.move(source, destination)
print (" ")
print ("Your file was moved to ", destination)



![[Image: TQjiRHy.png]](https://i.imgur.com/TQjiRHy.png)