Reputation: 5676 Overlord
- Active Posts:
- 12,431 (7.47 per day)
- 02-June 10
- Profile Views:
- Last Active:
- Today, 06:02 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 22 Dec 2014I have not idea what that is supposed to mean for the state of the actual code you are running. You showed us a block of code that you admit has meaningful lines removed. So I don't know if we are looking at the real code or not.
Simple question: Are you running this from Visual Studio so you can debug the variables at run-time? Show us a screen shot of the AUTOS pallet showing us the real runtime values of SourcePath DestPath and newPath.
Try adding some console.writeline statements so you can actually see what the program is doing.
This all ultra-basic debugging techniques that are described in the debugging tutorials I linked to you already. Have you worked through those tutorials?
Posted 22 Dec 2014No worries mate . If it *did* do that it would solve half the OP's issues.
Posted 22 Dec 2014You have no attachment.
I don't think you understand C# variables. @"Sourcepath" is a string literal, not a variable. So when your code tries to make a path of "Sourcepath" that's going to fail. Same of course with @"DestPath". I think you're trying to apply the syntax of SQL to C#.
You should probably try debugging this in Visual Studio before you assign it to a batch file to run. As a batch you're not going to see the exception errors when it fails.
See FAQ # 2 below
TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 6: How do I make Class1/Form1 talk to Class2/Form2
FAQ (Frequently Asked Questions - Updated July 2014
Posted 21 Dec 2014How is that any different than when I said iTunes randomizer will reset? In either system if you leave PlaylistAlpha and go to PlaylistBravo and back they will both reseed: Change order, change start point, reset the playlist as 'nothing yet played', etc.
Posted 21 Dec 2014If you tell iTunes to switch between playlists the randomizer will start over. Which means a song already played will get played again, and neither playlist will ever reach an end.
You could do something along these lines:
A - Ask user for a list of two or more playlist names.
B - Programmatically add them to a new playlist
C - When the new (merged) playlist is done, delete it.
So in your research of the iTunes API you'll need to find how to (at minimum):
- Read a playlist
- Add a new playlist
- Delete a playlist
- Add songs to a new playlist
- Detect with a playlist has completed (versus stopped by user)
Where to start? Well that depends on your skill level. One of the first things new programmers want to do is make a program. The problem is they generally don't know enough about design/architecture to be able to plan how the program works. This is akin to saying "I don't know anything about cars. I'm going to order a bunch of random parts and sheet metal then build a car, as a way to learn about auto mechanicing." They then start with UI because that's easy drag and drop, when in reality UI is the last thing you do after getting all the underlying logic working. So in our car metaphore they build the dashboard before engine. Later they write a question here asking
Quote"My dashboard is done, but it doesn't work right, the speedometer shows -40mph, none of the lights go on, and is missing gauges I need but I can't figure out how or where to add them. I've Googled 'backwards speedometer' but couldn't find a tutorial I could copy/paste from for my exact situation. I also built the doors, but they are 5 inches taller than the chassis and the hinges don't line up. I don't understand how an internal combustion engine works, but I've cobbled together some parts that I found in a catalog however they're no place for the air filter to go. What should I do now?"
So where would I suggest you start? With this tutorial list. If you breeze through it and there's nothing new to learn in any of them that's great and you'll only have lost an hour or two. If you spend a week on them, that's good too because you will have picked up vital skills you require for this (and most any) project.
Then the list of rookie projects pinned at the head of the C# thread. They are introductory projects that will help you evaluate your skills, and build them up. If you can't fly through self-contained projects then be honest with yourself and realize you're not ready to take on a project that interacts with someone else's software. If you do fly through them and you don't find anything in these tutorials that is new to you, then the next step with this project should seem pretty clear.
Tutorials I recommend:
- C# resources (Pinned to head of C# forum)
- C# Learning Series
The foundation of C# is Properties, Classes and Events. These tutorials are the barest of minimum starting points:
Then learn a few tips on doing good design:
- Your first WinForms application
Of course you'll want to save data:
- Separating data from GUI - PLUS - serializing the data to XML
- Read a playlist
- Member Title:
- Please show what you have already tried when asking a question.
- Age Unknown
- Birthday Unknown
- United States of America
- C#, Photography, Camping/Hiking, Travel
- Years Programming:
- Programming Languages:
- C#, WPF, MVVM