Create multiple txt (Text_01.txt — Text_50.txt) file with the file name and current date stamp [closed]











up vote
-4
down vote

favorite












Could somebody help me to write a script in Powershell to
create 50 .txt files with date and the name of the file in every file?
And then rename them and add the new name and date to the second line?










share|improve this question















closed as too broad by Matt, TheIncorrigible1, dfundako, LotPings, gnat Nov 20 at 6:45


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    Wow. This actually got 3 answers.
    – dfundako
    Nov 19 at 21:20















up vote
-4
down vote

favorite












Could somebody help me to write a script in Powershell to
create 50 .txt files with date and the name of the file in every file?
And then rename them and add the new name and date to the second line?










share|improve this question















closed as too broad by Matt, TheIncorrigible1, dfundako, LotPings, gnat Nov 20 at 6:45


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    Wow. This actually got 3 answers.
    – dfundako
    Nov 19 at 21:20













up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











Could somebody help me to write a script in Powershell to
create 50 .txt files with date and the name of the file in every file?
And then rename them and add the new name and date to the second line?










share|improve this question















Could somebody help me to write a script in Powershell to
create 50 .txt files with date and the name of the file in every file?
And then rename them and add the new name and date to the second line?







windows powershell






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 22:07









mklement0

123k20234265




123k20234265










asked Nov 19 at 20:06









Xebat Rammo

32




32




closed as too broad by Matt, TheIncorrigible1, dfundako, LotPings, gnat Nov 20 at 6:45


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Matt, TheIncorrigible1, dfundako, LotPings, gnat Nov 20 at 6:45


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 2




    Wow. This actually got 3 answers.
    – dfundako
    Nov 19 at 21:20














  • 2




    Wow. This actually got 3 answers.
    – dfundako
    Nov 19 at 21:20








2




2




Wow. This actually got 3 answers.
– dfundako
Nov 19 at 21:20




Wow. This actually got 3 answers.
– dfundako
Nov 19 at 21:20












3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










IMO you are a bit stressing the goodwill of people answering,

and not any upvote yet.



## Q:Test20181119SO_53381881.ps1
$DestPath = $ENV:TMP
1..50 | ForEach-Object {
$Now = [datetime]::Now
$NewName = "{0}{1:00}.txt" -f $DestPath,$_
New-Item -Path $NewName -ItemType 'File' -Force -Value "$NewName $Now`n" |Out-Null
}

## output current content
gci $Env:TMP[0-9][0-9].txt |sort name| gc


## rename by getting current numbers with a regex and subtracting 1
Get-ChildItem $Env:TMP[0-9][0-9].txt |sort name|
Where-Object BaseName -match "^(?<Number>d{2})$"| ForEach-Object {
$NewName = "{0}{1:00}{2}" -f $_.DirectoryName,([int]$Matches.Number -1),$_.Extension
$_ | Rename-Item -NewName $NewName
Add-Content -Path $NewName -Value "$NewName $Now`n"
}
## output new current content
gci $Env:TMP[0-9][0-9].txt | gc





share|improve this answer






























    up vote
    0
    down vote













    One liner:



    1..50 | ForEach-Object {New-Item  -Path "C:temp$($_.ToString("00"))_$(Get-Date -Format 'yy-mm-dd').txt"} 


    or if you want to write stuff to the file, and have something more readable



    foreach ($N in 1..50){
    $FilePath = "C:temp"
    $FileName = "Text_$($N.ToString("00")).txt"
    New-Item -Path "$FilePath$FileName"
    $Date = Get-Date
    Add-Content -Path "$FilePath$FileName" -Value $FileName
    Add-Content -Path "$FilePath$FileName" -Value $Date.ToString("hh:mm:ss dd/MM/yy")
    }


    note you will want to fiddle with the $Date.ToString() bit to allow for reigonal diferences.






    share|improve this answer























    • right I changed it then
      – BaronW
      Nov 19 at 20:46










    • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
      – Xebat Rammo
      Nov 19 at 21:01


















    up vote
    0
    down vote













    here's an alternate method. it breaks out most of the $Vars as individual items to make the process a tad more clear ... [grin]



    $DestDir = $env:TEMP
    $FNamePrefix = 'Text_'
    $FNameExt = '.txt'

    # if you want the file content to be all on one line, remove this $Var from the "Set-Content" line
    $NewLine = [environment]::NewLine

    $FileCount = 5
    foreach ($Count in 1..$FileCount)
    {
    $TimeStamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
    # create a left-padded 2 digit number string
    $Number = '{0:D2}' -f $Count
    $FileName = -join ($FNamePrefix, $Number, $FNameExt)
    $FullFileName = Join-Path -Path $DestDir -ChildPath $FileName

    # this will create the file or overwrite any pre-existing one
    # the "-Value" stuff will be in the file
    # to put the info all on one line use the following for the "-Value" info
    # ""$TimeStamp; $FileName"
    Set-Content -LiteralPath $FullFileName -Value "$TimeStamp$NewLine$FileName" -Force
    }


    there is no on-screen output. the content of the 1st file is ...



    2018-11-19 15:00:51
    Text_01.txt


    the name of that file is Text_01.txt. [grin]






    share|improve this answer





















    • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
      – Xebat Rammo
      Nov 19 at 21:06










    • @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
      – Lee_Dailey
      Nov 19 at 21:13










    • well am trying to create about 50 text files and then rename them without losing any line in the file.
      – Xebat Rammo
      Nov 19 at 21:18










    • @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
      – Lee_Dailey
      Nov 19 at 21:39










    • @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
      – Xebat Rammo
      Nov 19 at 21:45




















    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    IMO you are a bit stressing the goodwill of people answering,

    and not any upvote yet.



    ## Q:Test20181119SO_53381881.ps1
    $DestPath = $ENV:TMP
    1..50 | ForEach-Object {
    $Now = [datetime]::Now
    $NewName = "{0}{1:00}.txt" -f $DestPath,$_
    New-Item -Path $NewName -ItemType 'File' -Force -Value "$NewName $Now`n" |Out-Null
    }

    ## output current content
    gci $Env:TMP[0-9][0-9].txt |sort name| gc


    ## rename by getting current numbers with a regex and subtracting 1
    Get-ChildItem $Env:TMP[0-9][0-9].txt |sort name|
    Where-Object BaseName -match "^(?<Number>d{2})$"| ForEach-Object {
    $NewName = "{0}{1:00}{2}" -f $_.DirectoryName,([int]$Matches.Number -1),$_.Extension
    $_ | Rename-Item -NewName $NewName
    Add-Content -Path $NewName -Value "$NewName $Now`n"
    }
    ## output new current content
    gci $Env:TMP[0-9][0-9].txt | gc





    share|improve this answer



























      up vote
      1
      down vote



      accepted










      IMO you are a bit stressing the goodwill of people answering,

      and not any upvote yet.



      ## Q:Test20181119SO_53381881.ps1
      $DestPath = $ENV:TMP
      1..50 | ForEach-Object {
      $Now = [datetime]::Now
      $NewName = "{0}{1:00}.txt" -f $DestPath,$_
      New-Item -Path $NewName -ItemType 'File' -Force -Value "$NewName $Now`n" |Out-Null
      }

      ## output current content
      gci $Env:TMP[0-9][0-9].txt |sort name| gc


      ## rename by getting current numbers with a regex and subtracting 1
      Get-ChildItem $Env:TMP[0-9][0-9].txt |sort name|
      Where-Object BaseName -match "^(?<Number>d{2})$"| ForEach-Object {
      $NewName = "{0}{1:00}{2}" -f $_.DirectoryName,([int]$Matches.Number -1),$_.Extension
      $_ | Rename-Item -NewName $NewName
      Add-Content -Path $NewName -Value "$NewName $Now`n"
      }
      ## output new current content
      gci $Env:TMP[0-9][0-9].txt | gc





      share|improve this answer

























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        IMO you are a bit stressing the goodwill of people answering,

        and not any upvote yet.



        ## Q:Test20181119SO_53381881.ps1
        $DestPath = $ENV:TMP
        1..50 | ForEach-Object {
        $Now = [datetime]::Now
        $NewName = "{0}{1:00}.txt" -f $DestPath,$_
        New-Item -Path $NewName -ItemType 'File' -Force -Value "$NewName $Now`n" |Out-Null
        }

        ## output current content
        gci $Env:TMP[0-9][0-9].txt |sort name| gc


        ## rename by getting current numbers with a regex and subtracting 1
        Get-ChildItem $Env:TMP[0-9][0-9].txt |sort name|
        Where-Object BaseName -match "^(?<Number>d{2})$"| ForEach-Object {
        $NewName = "{0}{1:00}{2}" -f $_.DirectoryName,([int]$Matches.Number -1),$_.Extension
        $_ | Rename-Item -NewName $NewName
        Add-Content -Path $NewName -Value "$NewName $Now`n"
        }
        ## output new current content
        gci $Env:TMP[0-9][0-9].txt | gc





        share|improve this answer














        IMO you are a bit stressing the goodwill of people answering,

        and not any upvote yet.



        ## Q:Test20181119SO_53381881.ps1
        $DestPath = $ENV:TMP
        1..50 | ForEach-Object {
        $Now = [datetime]::Now
        $NewName = "{0}{1:00}.txt" -f $DestPath,$_
        New-Item -Path $NewName -ItemType 'File' -Force -Value "$NewName $Now`n" |Out-Null
        }

        ## output current content
        gci $Env:TMP[0-9][0-9].txt |sort name| gc


        ## rename by getting current numbers with a regex and subtracting 1
        Get-ChildItem $Env:TMP[0-9][0-9].txt |sort name|
        Where-Object BaseName -match "^(?<Number>d{2})$"| ForEach-Object {
        $NewName = "{0}{1:00}{2}" -f $_.DirectoryName,([int]$Matches.Number -1),$_.Extension
        $_ | Rename-Item -NewName $NewName
        Add-Content -Path $NewName -Value "$NewName $Now`n"
        }
        ## output new current content
        gci $Env:TMP[0-9][0-9].txt | gc






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 19 at 21:51

























        answered Nov 19 at 21:13









        LotPings

        16.2k61531




        16.2k61531
























            up vote
            0
            down vote













            One liner:



            1..50 | ForEach-Object {New-Item  -Path "C:temp$($_.ToString("00"))_$(Get-Date -Format 'yy-mm-dd').txt"} 


            or if you want to write stuff to the file, and have something more readable



            foreach ($N in 1..50){
            $FilePath = "C:temp"
            $FileName = "Text_$($N.ToString("00")).txt"
            New-Item -Path "$FilePath$FileName"
            $Date = Get-Date
            Add-Content -Path "$FilePath$FileName" -Value $FileName
            Add-Content -Path "$FilePath$FileName" -Value $Date.ToString("hh:mm:ss dd/MM/yy")
            }


            note you will want to fiddle with the $Date.ToString() bit to allow for reigonal diferences.






            share|improve this answer























            • right I changed it then
              – BaronW
              Nov 19 at 20:46










            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:01















            up vote
            0
            down vote













            One liner:



            1..50 | ForEach-Object {New-Item  -Path "C:temp$($_.ToString("00"))_$(Get-Date -Format 'yy-mm-dd').txt"} 


            or if you want to write stuff to the file, and have something more readable



            foreach ($N in 1..50){
            $FilePath = "C:temp"
            $FileName = "Text_$($N.ToString("00")).txt"
            New-Item -Path "$FilePath$FileName"
            $Date = Get-Date
            Add-Content -Path "$FilePath$FileName" -Value $FileName
            Add-Content -Path "$FilePath$FileName" -Value $Date.ToString("hh:mm:ss dd/MM/yy")
            }


            note you will want to fiddle with the $Date.ToString() bit to allow for reigonal diferences.






            share|improve this answer























            • right I changed it then
              – BaronW
              Nov 19 at 20:46










            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:01













            up vote
            0
            down vote










            up vote
            0
            down vote









            One liner:



            1..50 | ForEach-Object {New-Item  -Path "C:temp$($_.ToString("00"))_$(Get-Date -Format 'yy-mm-dd').txt"} 


            or if you want to write stuff to the file, and have something more readable



            foreach ($N in 1..50){
            $FilePath = "C:temp"
            $FileName = "Text_$($N.ToString("00")).txt"
            New-Item -Path "$FilePath$FileName"
            $Date = Get-Date
            Add-Content -Path "$FilePath$FileName" -Value $FileName
            Add-Content -Path "$FilePath$FileName" -Value $Date.ToString("hh:mm:ss dd/MM/yy")
            }


            note you will want to fiddle with the $Date.ToString() bit to allow for reigonal diferences.






            share|improve this answer














            One liner:



            1..50 | ForEach-Object {New-Item  -Path "C:temp$($_.ToString("00"))_$(Get-Date -Format 'yy-mm-dd').txt"} 


            or if you want to write stuff to the file, and have something more readable



            foreach ($N in 1..50){
            $FilePath = "C:temp"
            $FileName = "Text_$($N.ToString("00")).txt"
            New-Item -Path "$FilePath$FileName"
            $Date = Get-Date
            Add-Content -Path "$FilePath$FileName" -Value $FileName
            Add-Content -Path "$FilePath$FileName" -Value $Date.ToString("hh:mm:ss dd/MM/yy")
            }


            note you will want to fiddle with the $Date.ToString() bit to allow for reigonal diferences.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 19 at 20:46

























            answered Nov 19 at 20:16









            BaronW

            1215




            1215












            • right I changed it then
              – BaronW
              Nov 19 at 20:46










            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:01


















            • right I changed it then
              – BaronW
              Nov 19 at 20:46










            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:01
















            right I changed it then
            – BaronW
            Nov 19 at 20:46




            right I changed it then
            – BaronW
            Nov 19 at 20:46












            would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
            – Xebat Rammo
            Nov 19 at 21:01




            would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
            – Xebat Rammo
            Nov 19 at 21:01










            up vote
            0
            down vote













            here's an alternate method. it breaks out most of the $Vars as individual items to make the process a tad more clear ... [grin]



            $DestDir = $env:TEMP
            $FNamePrefix = 'Text_'
            $FNameExt = '.txt'

            # if you want the file content to be all on one line, remove this $Var from the "Set-Content" line
            $NewLine = [environment]::NewLine

            $FileCount = 5
            foreach ($Count in 1..$FileCount)
            {
            $TimeStamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            # create a left-padded 2 digit number string
            $Number = '{0:D2}' -f $Count
            $FileName = -join ($FNamePrefix, $Number, $FNameExt)
            $FullFileName = Join-Path -Path $DestDir -ChildPath $FileName

            # this will create the file or overwrite any pre-existing one
            # the "-Value" stuff will be in the file
            # to put the info all on one line use the following for the "-Value" info
            # ""$TimeStamp; $FileName"
            Set-Content -LiteralPath $FullFileName -Value "$TimeStamp$NewLine$FileName" -Force
            }


            there is no on-screen output. the content of the 1st file is ...



            2018-11-19 15:00:51
            Text_01.txt


            the name of that file is Text_01.txt. [grin]






            share|improve this answer





















            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:06










            • @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
              – Lee_Dailey
              Nov 19 at 21:13










            • well am trying to create about 50 text files and then rename them without losing any line in the file.
              – Xebat Rammo
              Nov 19 at 21:18










            • @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
              – Lee_Dailey
              Nov 19 at 21:39










            • @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
              – Xebat Rammo
              Nov 19 at 21:45

















            up vote
            0
            down vote













            here's an alternate method. it breaks out most of the $Vars as individual items to make the process a tad more clear ... [grin]



            $DestDir = $env:TEMP
            $FNamePrefix = 'Text_'
            $FNameExt = '.txt'

            # if you want the file content to be all on one line, remove this $Var from the "Set-Content" line
            $NewLine = [environment]::NewLine

            $FileCount = 5
            foreach ($Count in 1..$FileCount)
            {
            $TimeStamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            # create a left-padded 2 digit number string
            $Number = '{0:D2}' -f $Count
            $FileName = -join ($FNamePrefix, $Number, $FNameExt)
            $FullFileName = Join-Path -Path $DestDir -ChildPath $FileName

            # this will create the file or overwrite any pre-existing one
            # the "-Value" stuff will be in the file
            # to put the info all on one line use the following for the "-Value" info
            # ""$TimeStamp; $FileName"
            Set-Content -LiteralPath $FullFileName -Value "$TimeStamp$NewLine$FileName" -Force
            }


            there is no on-screen output. the content of the 1st file is ...



            2018-11-19 15:00:51
            Text_01.txt


            the name of that file is Text_01.txt. [grin]






            share|improve this answer





















            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:06










            • @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
              – Lee_Dailey
              Nov 19 at 21:13










            • well am trying to create about 50 text files and then rename them without losing any line in the file.
              – Xebat Rammo
              Nov 19 at 21:18










            • @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
              – Lee_Dailey
              Nov 19 at 21:39










            • @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
              – Xebat Rammo
              Nov 19 at 21:45















            up vote
            0
            down vote










            up vote
            0
            down vote









            here's an alternate method. it breaks out most of the $Vars as individual items to make the process a tad more clear ... [grin]



            $DestDir = $env:TEMP
            $FNamePrefix = 'Text_'
            $FNameExt = '.txt'

            # if you want the file content to be all on one line, remove this $Var from the "Set-Content" line
            $NewLine = [environment]::NewLine

            $FileCount = 5
            foreach ($Count in 1..$FileCount)
            {
            $TimeStamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            # create a left-padded 2 digit number string
            $Number = '{0:D2}' -f $Count
            $FileName = -join ($FNamePrefix, $Number, $FNameExt)
            $FullFileName = Join-Path -Path $DestDir -ChildPath $FileName

            # this will create the file or overwrite any pre-existing one
            # the "-Value" stuff will be in the file
            # to put the info all on one line use the following for the "-Value" info
            # ""$TimeStamp; $FileName"
            Set-Content -LiteralPath $FullFileName -Value "$TimeStamp$NewLine$FileName" -Force
            }


            there is no on-screen output. the content of the 1st file is ...



            2018-11-19 15:00:51
            Text_01.txt


            the name of that file is Text_01.txt. [grin]






            share|improve this answer












            here's an alternate method. it breaks out most of the $Vars as individual items to make the process a tad more clear ... [grin]



            $DestDir = $env:TEMP
            $FNamePrefix = 'Text_'
            $FNameExt = '.txt'

            # if you want the file content to be all on one line, remove this $Var from the "Set-Content" line
            $NewLine = [environment]::NewLine

            $FileCount = 5
            foreach ($Count in 1..$FileCount)
            {
            $TimeStamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            # create a left-padded 2 digit number string
            $Number = '{0:D2}' -f $Count
            $FileName = -join ($FNamePrefix, $Number, $FNameExt)
            $FullFileName = Join-Path -Path $DestDir -ChildPath $FileName

            # this will create the file or overwrite any pre-existing one
            # the "-Value" stuff will be in the file
            # to put the info all on one line use the following for the "-Value" info
            # ""$TimeStamp; $FileName"
            Set-Content -LiteralPath $FullFileName -Value "$TimeStamp$NewLine$FileName" -Force
            }


            there is no on-screen output. the content of the 1st file is ...



            2018-11-19 15:00:51
            Text_01.txt


            the name of that file is Text_01.txt. [grin]







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 19 at 21:04









            Lee_Dailey

            1,02266




            1,02266












            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:06










            • @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
              – Lee_Dailey
              Nov 19 at 21:13










            • well am trying to create about 50 text files and then rename them without losing any line in the file.
              – Xebat Rammo
              Nov 19 at 21:18










            • @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
              – Lee_Dailey
              Nov 19 at 21:39










            • @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
              – Xebat Rammo
              Nov 19 at 21:45




















            • would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
              – Xebat Rammo
              Nov 19 at 21:06










            • @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
              – Lee_Dailey
              Nov 19 at 21:13










            • well am trying to create about 50 text files and then rename them without losing any line in the file.
              – Xebat Rammo
              Nov 19 at 21:18










            • @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
              – Lee_Dailey
              Nov 19 at 21:39










            • @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
              – Xebat Rammo
              Nov 19 at 21:45


















            would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
            – Xebat Rammo
            Nov 19 at 21:06




            would it be possible to rename all files for example Text_01 --> Text_00 and so on and then add a new line to the file with the new file name and new date? many of thanks
            – Xebat Rammo
            Nov 19 at 21:06












            @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
            – Lee_Dailey
            Nov 19 at 21:13




            @XebatRammo - what changed? i thot you wanted to create the files with the create date/time and the file name in the file. now ... is this a different thing?
            – Lee_Dailey
            Nov 19 at 21:13












            well am trying to create about 50 text files and then rename them without losing any line in the file.
            – Xebat Rammo
            Nov 19 at 21:18




            well am trying to create about 50 text files and then rename them without losing any line in the file.
            – Xebat Rammo
            Nov 19 at 21:18












            @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
            – Lee_Dailey
            Nov 19 at 21:39




            @XebatRammo - rename them how? subtract one from the digits on the end? this step was not mentioned in your OP ... [grin]
            – Lee_Dailey
            Nov 19 at 21:39












            @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
            – Xebat Rammo
            Nov 19 at 21:45






            @ Lee_Dailey i know am sorry am very new here :/ as i mentioned before am trying to create 50 .txt file with the current date and then rename them but am trying to add the new name and the new date to every file. i'll appreciate it if you could help me with this
            – Xebat Rammo
            Nov 19 at 21:45





            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen