Click here to Skip to main content
15,911,789 members

Comments by Pete_123 (Top 4 by date)

Pete_123 11-Jan-16 8:41am View    
No im using https://code.google.com/p/ftpexplorer/
Pete_123 23-Dec-15 6:32am View    
Okay so i have removed the second loop and the other variable but when i renames the file it doesnt append to the orignal name it complty over writes it?
File.Move(Path.Combine(sourcePath, fileName), Path.Combine(sourcePath, "(AF)"))
Pete_123 23-Dec-15 6:05am View    
Hi Phil I’m not quite understanding what you’re saying if I remove the second loop its un able to uses the original file name and add the Initials at the beginning or am I missing a step ?
Pete_123 23-Dec-15 5:52am View    
Hi Phil Yes I see what you mean when the code is executed it fires this error:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not find file 'C:\Users\DaBeast\Desktop\PR\1.txt'.

dra {2.txt} System.IO.FileInfo
fileName "C:\Users\DaBeast\Desktop\PR\1.txt" String
sourcePath "C:\Users\DaBeast\Desktop\PR" String

I’m guessing in that due to there being two for loops one loop is ahead of the other causing this error.

in the folder it has already renamed 1.txt to (AF)1.txt which is correct but it then needs to rename 2.txt to (AF)2.txt