[Actual coding thread]A simple moving application
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
[Actual coding thread]A simple moving application
I got xcode and shit for programming, and I want to make an application, cross-platform (If I can only do windows thats fine, its not really for a mac application), that basically moves a file to another location. I would like some tips on what I should write this with, how I should do it, and if at all possible a quick tutorial. I have basically no coding experience except for a small amount of hex and some java from modding minecraft. Oh and HTML from a website design class I took.
Re: [Actual coding thread]A simple moving application
Moving files is the same as renaming their pathnames.
So you get the path of a file that the user opens (or that is found by the program in other ways) and you change the path to include another directory. If that directory doesn't exist, it's created.
If you rename a directory, it will actually change that directory's name. The same principle applies to files.
Get the file's path and insert it into a variable.
Redefine the variable when you write to the filesystem.
So you get the path of a file that the user opens (or that is found by the program in other ways) and you change the path to include another directory. If that directory doesn't exist, it's created.
If you rename a directory, it will actually change that directory's name. The same principle applies to files.
Get the file's path and insert it into a variable.
Redefine the variable when you write to the filesystem.
Either you are groping for answers, or you are asking God and listening to Jesus.
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
How would I have the user select the install folder and have the game folder [in this case ( I don't remember the windows format so if I do something wrong please correct it. "C:/Program files/JAN_ Realms (Demo 1.1)/Graphics/Characters/[$Male.png/$ralph.png]". I think I wrote that right. Well I want to program it so it doesn't need to be in program files, also copying 1 file, renaming it to the 2 files (the two are the same, but one seems not to do anything and the other actually changes the sprite, but I still want to replace both) and backing up the existing files [$male and $ralph].
Edit: I keep trying to find this on google but all I see is how to move a file to an external drive and other dumb shit. Sparky im not sure how to implement that. If someone could maybe write the code [in java maybe? something cross platform] With an example path (not the path to the game, maybe C:/Example/example/example) ect. Then I would analyze that code and test some things, then I would understand that part of the coding language. And that's how I learned what I know of java (very little, but its more than I ever though I would <_<).
Edit: I keep trying to find this on google but all I see is how to move a file to an external drive and other dumb shit. Sparky im not sure how to implement that. If someone could maybe write the code [in java maybe? something cross platform] With an example path (not the path to the game, maybe C:/Example/example/example) ect. Then I would analyze that code and test some things, then I would understand that part of the coding language. And that's how I learned what I know of java (very little, but its more than I ever though I would <_<).
Re: [Actual coding thread]A simple moving application
Since you are looking to move files in Windows, why not just create a bat file that moves them?
Kansas....Like Paris Hilton: White, Flat, and Easy to Enter. -- Conan O'Brien
Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat
Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
I'm not sure how to make a .bat to move files. That would work though, providing someone can tell me how.
-
- Commando
- Posts: 2791
- Joined: Sun May 06, 2007 3:27 am
- Location: SiK x Gh0sTs Rehauled.
- Contact:
Re: [Actual coding thread]A simple moving application
Code: Select all
move /-y "Directory\file" "New_Directory"
pause
TaxiService wrote:Roses are red
Violets are blue
What a shitty thread
Fuck all of you.
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
Ok, so I create a document in notepad and save as bat?
Went and did that. Thanks man, it works. Now If I could have the user choose the file to move's location...
Went and did that. Thanks man, it works. Now If I could have the user choose the file to move's location...
-
- Commando
- Posts: 2791
- Joined: Sun May 06, 2007 3:27 am
- Location: SiK x Gh0sTs Rehauled.
- Contact:
Re: [Actual coding thread]A simple moving application
What do you mean?
TaxiService wrote:Roses are red
Violets are blue
What a shitty thread
Fuck all of you.
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
Basically It would be nice if I could have the user type the path of the file that is being moved instead of it being a single path.
Re: [Actual coding thread]A simple moving application
You could probably either change the properties of one of these files or drag the file to be moved onto the .bat file. Research .bat file commands.
Either you are groping for answers, or you are asking God and listening to Jesus.
-
- Commando
- Posts: 2791
- Joined: Sun May 06, 2007 3:27 am
- Location: SiK x Gh0sTs Rehauled.
- Contact:
Re: [Actual coding thread]A simple moving application
To save a string to a temporary file.Mgalekgolo wrote:Basically It would be nice if I could have the user type the path of the file that is being moved instead of it being a single path.
Code: Select all
ECHO ←[13;0;64;13p
COPY CON USRINPUT.TMP
ECHO ←[13;13p
CLS
TaxiService wrote:Roses are red
Violets are blue
What a shitty thread
Fuck all of you.
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
I don't see how I could set a path with that ^.
What sparky said (drag and drop the file) seems good. I basically want to have a path set for destination but an open ended original file. The .bat I have now works well enough though.
What sparky said (drag and drop the file) seems good. I basically want to have a path set for destination but an open ended original file. The .bat I have now works well enough though.
-
- Commando
- Posts: 2791
- Joined: Sun May 06, 2007 3:27 am
- Location: SiK x Gh0sTs Rehauled.
- Contact:
Re: [Actual coding thread]A simple moving application
If you want to drag and drop a selected file onto a direct file path can't you just create an alias?
TaxiService wrote:Roses are red
Violets are blue
What a shitty thread
Fuck all of you.
-
- Commando
- Posts: 2589
- Joined: Thu Jun 24, 2010 6:36 am
Re: [Actual coding thread]A simple moving application
If I understand you right that would seem to require knowledge of where the destination directory is, which is what im trying to avoid.
-
- Commando
- Posts: 2791
- Joined: Sun May 06, 2007 3:27 am
- Location: SiK x Gh0sTs Rehauled.
- Contact:
Re: [Actual coding thread]A simple moving application
I'm still very confused about what exactly you're trying to do... Here's what I have: You want to be able to move any file you want to a specific directory, the directory being the same everytime, but with the user having no actual knowledge of where the directory is?
TaxiService wrote:Roses are red
Violets are blue
What a shitty thread
Fuck all of you.
Who is online
Users browsing this forum: No registered users and 8 guests