|
I think if yo use completely random names for things, you could obfuscate it more.
(Yes, I'm one of those weird Outlaw Programmer moods today. Nobody is safe.)
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I have the following code which stores the filenames in an array. However, I want only the filenames to be stored. Surely there is an easy way to do this? I know I can replace the line, imageNames.Add(img); with imageNames.Add(img.Remove(0, 22)); which will remove the path (first 22 chars) leaving just the filename but this will be different when I upload to my server so don't really want to do it this way. Any ideas will greatly appreciated.
foreach (string img in Directory.GetFiles(imagesDir, "*.jpg"))
{
imageNames.Add(img);
}
Many thanks
Lorna
|
|
|
|
|
hello
DirectoryInfo di = new DirectoryInfo(Path........);
FileInfo[] rgFiles = di.GetFiles("*.jpg");
foreach (FileInfo fi in rgFiles)
{
// add u r needs
}
|
|
|
|
|
Thanks but is that not the same as what I have and I get the complete path - here is another 2 lines of the code:
ArrayList imageNames = new ArrayList();
string imagesDir = Server.MapPath("~/administration/uploaded/");
foreach (string img in Directory.GetFiles(imagesDir, "*.jpg"))
{
imageNames.Add(img);
}
thanks
Lorna
|
|
|
|
|
|
Hi Lorna
This should help you...
DirectoryInfo dir = new DirectoryInfo(@"C:\Test");
foreach (FileInfo file in dir.GetFiles())
{
Console.WriteLine(file.Name);
}
oooo, the Jedi's will feel this one....
|
|
|
|
|
Hurray it works! Thank you very much. For any other interested parties, I rewrote as:
DirectoryInfo dir = new DirectoryInfo(@Server.MapPath("~/administration/uploaded/"));
foreach (FileInfo file in dir.GetFiles())
{
imageNames.Add(file.Name);
}
Which gave me an ArrayList of filenames only (no path).
|
|
|
|
|
Glad to help.
oooo, the Jedi's will feel this one....
|
|
|
|
|
Hi,
.Net2 VS2005
I have a windows forms client app that connects to a web service. In iis I know the port number can be set for the web service (default is 80 but lets say I change this to 81) - and this is repeated in the app.config file in the client. (so this port number is all to do with the web service)
The app connects to the web service and works fine - but is there another similar setting available for the app?? ie on the client machine can I specify what port the client uses connect outward?
Thanks,
Chas
|
|
|
|
|
Can't you specify the port in the URL of the web service with a colon?
ie:
http://www.MyWebService.com:7560
Insert funny quote here.
|
|
|
|
|
Hi,
Yes that is what im doing...
What I was after is what port does the client pc use locally? I guess what im asking is something like what port does a pc use when it connects to anything on the net - and can this be changed?
Thanks,
Chas
|
|
|
|
|
|
hello Neo Andreson
this is not the place for u r FUN >>>
|
|
|
|
|
TJS4u wrote: for u r FUN
"For you are fun"?
No, he's not fun.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Use notepad to test your keyboard, not codeproject
|
|
|
|
|
hello Neo Andreson
use u r to test u r alphabetical skills
not this Board
modified on Thursday, December 11, 2008 7:41 AM
|
|
|
|
|
TJS4u wrote: use u r to test u r alphabetical skills
It looks like you're still testing your alphabetical skills. Stop using TXTspeak and spell out what you're trying to say. It makes your posts difficult to read.
|
|
|
|
|
what is this?
Cheers!!
Brij
|
|
|
|
|
do something for u
and not disturbing others
no job for u ??? why do waste ur time
let all u r dreams come true
have a greate day dear
|
|
|
|
|
TJS4u wrote: have a greate day dear
How do we get it over to all Indians that calling people "dear" is really creepy. Westerners tend to reserve this keyword for their nearest and dearest.
|
|
|
|
|
reply with honey?
|
|
|
|
|
hello all
how can we place a close button for the tabcontrol
Thanks
|
|
|
|
|
There is a custom tab control on codeproject which provides close button for each tab. A simple search should be able to find it.
|
|
|
|
|
Hello Giorgi Dalakishvili
Thanks a lot for u r reply
TJS
|
|
|
|
|
You are welcome
|
|
|
|