Python Forum
How to transfer a music file, from "uploads" directory into my project
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to transfer a music file, from "uploads" directory into my project
#11
I go to the terminal, cd pong(project of the creator), after some cd I find the music file named "destination-01.mp3". I make a "cat" on this file. After many pages of binaries(illisible) it gives the following (I paste).....................................     sylvain@sylvain-HP-Mini-110-1100:~/pong/resources/music$ 62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c62;9;c

You see there is no question of any path. May someone help me with the above. Thanks
Reply
#12
Your post are confusing,you are trying to get a .mp3 file from the pong game of @metulburr.
Have you heard of git and know how to get a Repo to your commuter(with git clone)?
A quick demo.
E:\1py_div\div_code
λ git clone https://github.com/metulburr/pong.git
Cloning into 'pong'...
remote: Counting objects: 583, done.
remote: Total 583 (delta 0), reused 0 (delta 0), pack-reused 583
Receiving objects: 100% (583/583), 17.67 MiB | 1007.00 KiB/s, done.
Resolving deltas: 100% (338/338), done.
Checking connectivity... done.
Now i have all files of pong Repo on my computer.
Say i want destination-01.mp3 in my foo project,
i can just move file in file explorer.
If i want to do it with command line cd into folder and copy it:
E:\1py_div\div_code\pong\resources\music (master)
λ copy destination-01.mp3 c:\foo
1 file(s) copied.
Then file is in my project foo folder.
I never cat/open or do anything else with the file,it's binary .mp3 that just work in any media player.
Reply
#13
My project is named "ping". Now a paste......................................................................................................................sylvain@sylvain-HP-Mini-110-1100:~/pong/resources/music$ copy destination-01.mp3 c:\ping
No command 'copy' found, did you mean:
 Command 'mcopy' from package 'mtools' (main)
 Command 'copt' from package 'z88dk-bin' (universe)
 Command 'fcopy' from package 'fai-client' (universe)
 Command 'rcopy' from package 'rdmacm-utils' (universe)
 Command 'bcopy' from package 'bareos-tools' (universe)
 Command 'bcopy' from package 'bacula-sd-sqlite3' (universe)
 Command 'bcopy' from package 'bacula-sd-mysql' (universe)
 Command 'bcopy' from package 'bacula-sd-pgsql' (universe)
 Command 'hcopy' from package 'hfsutils' (main)
copy: command not found
sylvain@sylvain-HP-Mini-110-1100:~/pong/resources/music$

I tried also :sylvain@sylvain-HP-Mini-110-1100:~/pong/resources/music$ copy destination-01.mp3 c:\ping\resources\music

without success.
Reply
#14
I don't know why, the music file dropped on my directory "Bureau"
Reply
#15
You are using Linux the is cp and not copy.
The same on Linux.
mint@mint ~ $ git clone https://github.com/metulburr/pong.git
Cloning into 'pong'...
remote: Counting objects: 583, done.
remote: Total 583 (delta 0), reused 0 (delta 0), pack-reused 583
Receiving objects: 100% (583/583), 17.67 MiB | 1.71 MiB/s, done.
Resolving deltas: 100% (338/338), done.
Checking connectivity... done.
At this point i have have a folder pong with all files,
then can just use a  file manger and move file to where i want.

If want to us command line.
# cd into folder
mint@mint ~/pong/resources $ cd /home/mint/pong/resources/music
mint@mint ~/pong/resources/music $ ls
barn-beat-01.mp3  cautious-path-01.mp3  destination-01.mp3  heart-of-the-sea-01.mp3  iron-man-01.mp3  jungle-run-01.mp3  midnight-ride-01a.mp3

# Copy to /foo folder
mint@mint ~/pong/resources/music $ cp destination-01.mp3 /home/mint/foo
mint@mint ~/pong/resources/music $ cd /home/mint/foo

# ls on /foo folder
mint@mint ~/foo $ ls
destination-01.mp3  hello.py
Reply
#16
Phew ! Problem solved. Bravo Snipsat. Long life to Terminal . Even if it is heavy .........sylvain@sylvain-HP-Mini-110-1100:~/pong/resources/music$ cp destination-01.mp3 /home/sylvain/PycharmProjects/ping/resources/music
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,076 Jun-27-2023, 01:17 PM
Last Post: diver999
  Extract file only (without a directory it is in) from ZIPIP tester_V 1 928 Jan-23-2023, 04:56 AM
Last Post: deanhystad
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,064 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  Web project and running a .py file emont 0 619 Dec-11-2022, 11:15 PM
Last Post: emont
  no such file or directory in SFTP saisankalpj 2 1,493 Nov-25-2022, 11:07 AM
Last Post: DeaD_EyE
Photo Making Zip file of a file and Directory Nasir 2 985 Oct-07-2022, 02:01 PM
Last Post: Nasir
  Failed to execute child process (No such file or directory) uriel 1 1,616 Sep-15-2022, 03:48 PM
Last Post: Gribouillis
  file transfer via python SFTP SCP mg24 3 2,875 Sep-15-2022, 04:20 AM
Last Post: mg24
  Need Help: FileNotFoundError:[Errno 2] No such file or directory python202209 5 2,523 Sep-12-2022, 04:50 AM
Last Post: python202209
  Multithreaded file transfer from multiple volumes skoobi 2 1,105 Jul-28-2022, 07:52 AM
Last Post: skoobi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020