# Forfiles @fdate batch file



## rmsimp1 (Aug 24, 2006)

I'm trying to move files by date to a new folder distinguished by the files date. Is there a way to format @fdate to not have the "/" (currently it appears 8/23/2006), or is there another command all together that will accomplish this?

Thank you for any help.

Roni


----------



## levi.rogers (Jun 23, 2006)

*I think you might be able to find something here:*

http://www.microsoft.com/technet/scriptcenter/default.mspx


There is more than likely a script on here that will work. I am looking right now, however, I did not see one. I am trying to write you a script to do this, you will have to give me a little while.


----------



## rmsimp1 (Aug 24, 2006)

Thank you very much for your help. I'm checking this site out now.


----------



## levi.rogers (Jun 23, 2006)

*I am still working on this.*

I am not having much luck so far. Have you found anything? If not we might have to ask a little better code junky than myself. 

LR


----------



## bilbus (Aug 29, 2006)

I use 

File-%date:~4,2%-%date:~7,2%-%date:~-4%.txt

that will format the file as "file-10-10-2001.txt" (will name the current date)


----------



## rmsimp1 (Aug 24, 2006)

I have not had much luck either. The date code does work for the day, but is there anything that would work with the file date? Thank you so much.

Roni


----------



## bilbus (Aug 29, 2006)

not sure what you mean.

My reply changes the file to the date of the computer. Are you trying to rename a file based on the date it was modifyed?


----------



## rmsimp1 (Aug 24, 2006)

The last modified date was what my goal was, using fdate. I wasn't able to find a way to format the / out of it. The idea is to create a new folder with this date and move all files to that specific directory. Any idea if this is a possibility? If not, using the computer date should work for me.


----------



## techhelp111 (Oct 4, 2006)

roni...have you been able to resolve your issue. I'm having the same problem and was hoping you could give me some direction


----------

