Click here to Skip to main content
11,410,529 members (57,892 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I have 2 questions:

1 I want to get all file's name in a folder.How can I do this?
2 How can I separate first 8 characters of a word?

I wanna make a c# windows form app that is able to get a folder address and separate the pictures that their name is equal(first 8 characters show the date they had taken)
I search the web and I found a solution but it doesn't work that is using the "system.linq" class.visual studio doesn't recognize this class!
Thanks
Posted 28-Mar-13 21:59pm
mdhrchi262
Comments
Zoltán Zörgő at 29-Mar-13 3:24am
   
Paste your code here - the numbered questions have little to do with linq...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Linq should be recognized, update your VS' also:
make sure you have written in that specific class "using System.Linq;"
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

yes substring is the best way to get the name of file
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 8,755
1 OriginalGriff 6,915
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web04 | 2.8.150414.5 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100